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

Side by Side Diff: net/socket_stream/socket_stream.cc

Issue 10408067: [net] Switch TestURLRequestContext to use MockCachingHostResolver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to trunk. Created 8 years, 7 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 | « net/socket_stream/socket_stream.h ('k') | net/socket_stream/socket_stream_unittest.cc » ('j') | 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 // TODO(ukai): code is similar with http_network_transaction.cc. We should 5 // TODO(ukai): code is similar with http_network_transaction.cc. We should
6 // think about ways to share code, if possible. 6 // think about ways to share code, if possible.
7 7
8 #include "net/socket_stream/socket_stream.h" 8 #include "net/socket_stream/socket_stream.h"
9 9
10 #include <set> 10 #include <set>
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 net_log_.AddEvent(NetLog::TYPE_CANCELLED, NULL); 239 net_log_.AddEvent(NetLog::TYPE_CANCELLED, NULL);
240 // We don't need to send pending data when client detach the delegate. 240 // We don't need to send pending data when client detach the delegate.
241 pending_write_bufs_.clear(); 241 pending_write_bufs_.clear();
242 Close(); 242 Close();
243 } 243 }
244 244
245 const ProxyServer& SocketStream::proxy_server() const { 245 const ProxyServer& SocketStream::proxy_server() const {
246 return proxy_info_.proxy_server(); 246 return proxy_info_.proxy_server();
247 } 247 }
248 248
249 void SocketStream::SetHostResolver(HostResolver* host_resolver) {
250 DCHECK(host_resolver);
251 host_resolver_ = host_resolver;
252 }
253
254 void SocketStream::SetClientSocketFactory( 249 void SocketStream::SetClientSocketFactory(
255 ClientSocketFactory* factory) { 250 ClientSocketFactory* factory) {
256 DCHECK(factory); 251 DCHECK(factory);
257 factory_ = factory; 252 factory_ = factory;
258 } 253 }
259 254
260 void SocketStream::CancelWithError(int error) { 255 void SocketStream::CancelWithError(int error) {
261 MessageLoop::current()->PostTask( 256 MessageLoop::current()->PostTask(
262 FROM_HERE, 257 FROM_HERE,
263 base::Bind(&SocketStream::DoLoop, this, error)); 258 base::Bind(&SocketStream::DoLoop, this, error));
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 1212
1218 SSLConfigService* SocketStream::ssl_config_service() const { 1213 SSLConfigService* SocketStream::ssl_config_service() const {
1219 return context_->ssl_config_service(); 1214 return context_->ssl_config_service();
1220 } 1215 }
1221 1216
1222 ProxyService* SocketStream::proxy_service() const { 1217 ProxyService* SocketStream::proxy_service() const {
1223 return context_->proxy_service(); 1218 return context_->proxy_service();
1224 } 1219 }
1225 1220
1226 } // namespace net 1221 } // namespace net
OLDNEW
« no previous file with comments | « net/socket_stream/socket_stream.h ('k') | net/socket_stream/socket_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698