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

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

Issue 10440119: Introduce a delegate to avoid hardcoding "chrome-extension" in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review nit and merge to LKGR for commit. 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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 const std::string& cookie_line, 94 const std::string& cookie_line,
95 CookieOptions* options) OVERRIDE { 95 CookieOptions* options) OVERRIDE {
96 return true; 96 return true;
97 } 97 }
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 {
105 return false;
106 }
107
104 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); 108 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate);
105 }; 109 };
106 110
107 class BasicURLRequestContext : public URLRequestContext { 111 class BasicURLRequestContext : public URLRequestContext {
108 public: 112 public:
109 BasicURLRequestContext() 113 BasicURLRequestContext()
110 : cache_thread_("Cache Thread"), 114 : cache_thread_("Cache Thread"),
111 file_thread_("File Thread"), 115 file_thread_("File Thread"),
112 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {} 116 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {}
113 117
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 http_transaction_factory = new HttpNetworkLayer(network_session); 276 http_transaction_factory = new HttpNetworkLayer(network_session);
273 } 277 }
274 storage->set_http_transaction_factory(http_transaction_factory); 278 storage->set_http_transaction_factory(http_transaction_factory);
275 279
276 // TODO(willchan): Support sdch. 280 // TODO(willchan): Support sdch.
277 281
278 return context; 282 return context;
279 } 283 }
280 284
281 } // namespace net 285 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_script_fetcher_impl_unittest.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698