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

Unified Diff: chrome/browser/io_thread.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/net/chrome_network_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 4bdc0aa784d88970b713ab4a64e544c4f695963d..e252afa59015b7573e67b649a9a98762012824b3 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -395,13 +395,18 @@ void IOThread::Init() {
globals_->extension_event_router_forwarder =
extension_event_router_forwarder_;
- globals_->system_network_delegate.reset(new ChromeNetworkDelegate(
+ ChromeNetworkDelegate* network_delegate = new ChromeNetworkDelegate(
extension_event_router_forwarder_,
NULL,
NULL,
NULL,
NULL,
- &system_enable_referrers_));
+ &system_enable_referrers_);
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableExtensionsHttpThrottling)) {
+ network_delegate->NeverThrottleRequests();
+ }
+ globals_->system_network_delegate.reset(network_delegate);
globals_->host_resolver.reset(
CreateGlobalHostResolver(net_log_));
globals_->cert_verifier.reset(net::CertVerifier::CreateDefault());
@@ -447,13 +452,9 @@ void IOThread::Init() {
new net::FtpNetworkLayer(globals_->host_resolver.get()));
globals_->throttler_manager.reset(new net::URLRequestThrottlerManager());
+ globals_->throttler_manager->set_net_log(net_log_);
// Always done in production, disabled only for unit tests.
globals_->throttler_manager->set_enable_thread_checks(true);
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableExtensionsHttpThrottling)) {
- globals_->throttler_manager->set_enforce_throttling(false);
- }
- globals_->throttler_manager->set_net_log(net_log_);
globals_->proxy_script_fetcher_context.reset(
ConstructProxyScriptFetcherContext(globals_, net_log_));
« no previous file with comments | « no previous file | chrome/browser/net/chrome_network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698