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

Side by Side Diff: net/url_request/url_request_context_builder.cc

Issue 10541046: Adds NetworkDelegate::NotifyBeforeSocketStreamConnect() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed comments 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
« no previous file with comments | « net/socket_stream/socket_stream_unittest.cc ('k') | net/url_request/url_request_test_util.h » ('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 #include "net/url_request/url_request_context_builder.h" 5 #include "net/url_request/url_request_context_builder.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 virtual bool OnCanAccessFile(const net::URLRequest& request, 99 virtual bool OnCanAccessFile(const net::URLRequest& request,
100 const FilePath& path) const OVERRIDE { 100 const FilePath& path) const OVERRIDE {
101 return true; 101 return true;
102 } 102 }
103 103
104 virtual bool OnCanThrottleRequest(const URLRequest& request) const OVERRIDE { 104 virtual bool OnCanThrottleRequest(const URLRequest& request) const OVERRIDE {
105 return false; 105 return false;
106 } 106 }
107 107
108 virtual int OnBeforeSocketStreamConnect(
109 SocketStream* stream,
110 const CompletionCallback& callback) OVERRIDE {
111 return OK;
112 }
113
108 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); 114 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate);
109 }; 115 };
110 116
111 class BasicURLRequestContext : public URLRequestContext { 117 class BasicURLRequestContext : public URLRequestContext {
112 public: 118 public:
113 BasicURLRequestContext() 119 BasicURLRequestContext()
114 : cache_thread_("Cache Thread"), 120 : cache_thread_("Cache Thread"),
115 file_thread_("File Thread"), 121 file_thread_("File Thread"),
116 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {} 122 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {}
117 123
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 http_transaction_factory = new HttpNetworkLayer(network_session); 282 http_transaction_factory = new HttpNetworkLayer(network_session);
277 } 283 }
278 storage->set_http_transaction_factory(http_transaction_factory); 284 storage->set_http_transaction_factory(http_transaction_factory);
279 285
280 // TODO(willchan): Support sdch. 286 // TODO(willchan): Support sdch.
281 287
282 return context; 288 return context;
283 } 289 }
284 290
285 } // namespace net 291 } // namespace net
OLDNEW
« no previous file with comments | « net/socket_stream/socket_stream_unittest.cc ('k') | net/url_request/url_request_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698