Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Unified Diff: remoting/protocol/fake_session.cc

Issue 7604021: Revert 96089 - Remove video_channel() from Session interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/fake_session.h ('k') | remoting/protocol/jingle_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_session.cc
===================================================================
--- remoting/protocol/fake_session.cc (revision 96105)
+++ remoting/protocol/fake_session.cc (working copy)
@@ -70,67 +70,6 @@
return false;
}
-int FakeSocket::Connect(net::CompletionCallback* callback) {
- return net::OK;
-}
-
-void FakeSocket::Disconnect() {
- NOTIMPLEMENTED();
-}
-
-bool FakeSocket::IsConnected() const {
- return true;
-}
-
-bool FakeSocket::IsConnectedAndIdle() const {
- NOTIMPLEMENTED();
- return false;
-}
-
-int FakeSocket::GetPeerAddress(
- net::AddressList* address) const {
- NOTIMPLEMENTED();
- return net::ERR_FAILED;
-}
-
-int FakeSocket::GetLocalAddress(
- net::IPEndPoint* address) const {
- NOTIMPLEMENTED();
- return net::ERR_FAILED;
-}
-
-const net::BoundNetLog& FakeSocket::NetLog() const {
- return net_log_;
-}
-
-void FakeSocket::SetSubresourceSpeculation() {
- NOTIMPLEMENTED();
-}
-
-void FakeSocket::SetOmniboxSpeculation() {
- NOTIMPLEMENTED();
-}
-
-bool FakeSocket::WasEverUsed() const {
- NOTIMPLEMENTED();
- return true;
-}
-
-bool FakeSocket::UsingTCPFastOpen() const {
- NOTIMPLEMENTED();
- return true;
-}
-
-int64 FakeSocket::NumBytesRead() const {
- NOTIMPLEMENTED();
- return 0;
-}
-
-base::TimeDelta FakeSocket::GetConnectTimeMicros() const {
- NOTIMPLEMENTED();
- return base::TimeDelta();
-}
-
FakeUdpSocket::FakeUdpSocket()
: read_pending_(false),
input_pos_(0) {
@@ -196,31 +135,21 @@
FakeSession::~FakeSession() { }
-FakeSocket* FakeSession::GetStreamChannel(const std::string& name) {
- return stream_channels_[name];
-}
-
-FakeUdpSocket* FakeSession::GetDatagramChannel(const std::string& name) {
- return datagram_channels_[name];
-}
-
-void FakeSession::SetStateChangeCallback(StateChangeCallback* callback) {
+void FakeSession::SetStateChangeCallback(
+ StateChangeCallback* callback) {
callback_.reset(callback);
}
void FakeSession::CreateStreamChannel(
const std::string& name, const StreamChannelCallback& callback) {
- LOG(ERROR) << " creating channel " << name;
- FakeSocket* channel = new FakeSocket();
- stream_channels_[name] = channel;
- callback.Run(name, channel);
+ NOTIMPLEMENTED();
+ callback.Run(name, NULL);
}
void FakeSession::CreateDatagramChannel(
const std::string& name, const DatagramChannelCallback& callback) {
- FakeUdpSocket* channel = new FakeUdpSocket();
- datagram_channels_[name] = channel;
- callback.Run(name, channel);
+ NOTIMPLEMENTED();
+ callback.Run(name, NULL);
}
FakeSocket* FakeSession::control_channel() {
@@ -231,6 +160,18 @@
return &event_channel_;
}
+FakeSocket* FakeSession::video_channel() {
+ return &video_channel_;
+}
+
+FakeUdpSocket* FakeSession::video_rtp_channel() {
+ return &video_rtp_channel_;
+}
+
+FakeUdpSocket* FakeSession::video_rtcp_channel() {
+ return &video_rtcp_channel_;
+}
+
const std::string& FakeSession::jid() {
return jid_;
}
« no previous file with comments | « remoting/protocol/fake_session.h ('k') | remoting/protocol/jingle_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698