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

Side by Side Diff: remoting/protocol/fake_session.cc

Issue 10491007: fixed issue 128383 - replace GetPeerAddress(AddressList* address) with GetPeerAddress(IPEndPoint* a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix according to review Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/fake_session.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/fake_session.h" 5 #include "remoting/protocol/fake_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "net/base/address_list.h" 9 #include "net/base/address_list.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 bool FakeSocket::IsConnected() const { 106 bool FakeSocket::IsConnected() const {
107 EXPECT_EQ(message_loop_, MessageLoop::current()); 107 EXPECT_EQ(message_loop_, MessageLoop::current());
108 return true; 108 return true;
109 } 109 }
110 110
111 bool FakeSocket::IsConnectedAndIdle() const { 111 bool FakeSocket::IsConnectedAndIdle() const {
112 NOTIMPLEMENTED(); 112 NOTIMPLEMENTED();
113 return false; 113 return false;
114 } 114 }
115 115
116 int FakeSocket::GetPeerAddress(net::AddressList* address) const { 116 int FakeSocket::GetPeerAddress(net::IPEndPoint* address) const {
117 net::IPAddressNumber ip; 117 net::IPAddressNumber ip(net::kIPv4AddressSize);
118 ip.resize(net::kIPv4AddressSize); 118 *address = net::IPEndPoint(ip, 0);
119 *address = net::AddressList::CreateFromIPAddress(ip, 0);
120 return net::OK; 119 return net::OK;
121 } 120 }
122 121
123 int FakeSocket::GetLocalAddress( 122 int FakeSocket::GetLocalAddress(net::IPEndPoint* address) const {
124 net::IPEndPoint* address) const {
125 NOTIMPLEMENTED(); 123 NOTIMPLEMENTED();
126 return net::ERR_FAILED; 124 return net::ERR_FAILED;
127 } 125 }
128 126
129 const net::BoundNetLog& FakeSocket::NetLog() const { 127 const net::BoundNetLog& FakeSocket::NetLog() const {
130 EXPECT_EQ(message_loop_, MessageLoop::current()); 128 EXPECT_EQ(message_loop_, MessageLoop::current());
131 return net_log_; 129 return net_log_;
132 } 130 }
133 131
134 void FakeSocket::SetSubresourceSpeculation() { 132 void FakeSocket::SetSubresourceSpeculation() {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 void FakeSession::set_config(const SessionConfig& config) { 286 void FakeSession::set_config(const SessionConfig& config) {
289 config_ = config; 287 config_ = config;
290 } 288 }
291 289
292 void FakeSession::Close() { 290 void FakeSession::Close() {
293 closed_ = true; 291 closed_ = true;
294 } 292 }
295 293
296 } // namespace protocol 294 } // namespace protocol
297 } // namespace remoting 295 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/fake_session.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698