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

Side by Side Diff: chrome/browser/net/connection_tester.cc

Issue 10203002: Make URLRequestThrottlerManager a member of URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR (pure merge) Created 8 years, 8 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 "chrome/browser/net/connection_tester.h" 5 #include "chrome/browser/net/connection_tester.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 #include "net/http/http_cache.h" 25 #include "net/http/http_cache.h"
26 #include "net/http/http_network_session.h" 26 #include "net/http/http_network_session.h"
27 #include "net/http/http_server_properties_impl.h" 27 #include "net/http/http_server_properties_impl.h"
28 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h" 28 #include "net/proxy/dhcp_proxy_script_fetcher_factory.h"
29 #include "net/proxy/proxy_config_service_fixed.h" 29 #include "net/proxy/proxy_config_service_fixed.h"
30 #include "net/proxy/proxy_script_fetcher_impl.h" 30 #include "net/proxy/proxy_script_fetcher_impl.h"
31 #include "net/proxy/proxy_service.h" 31 #include "net/proxy/proxy_service.h"
32 #include "net/url_request/url_request.h" 32 #include "net/url_request/url_request.h"
33 #include "net/url_request/url_request_context.h" 33 #include "net/url_request/url_request_context.h"
34 #include "net/url_request/url_request_context_storage.h" 34 #include "net/url_request/url_request_context_storage.h"
35 #include "net/url_request/url_request_throttler_manager.h"
35 36
36 #if !defined(OS_ANDROID) 37 #if !defined(OS_ANDROID)
37 #include "chrome/browser/importer/firefox_proxy_settings.h" 38 #include "chrome/browser/importer/firefox_proxy_settings.h"
38 #endif 39 #endif
39 40
40 namespace { 41 namespace {
41 42
42 // ExperimentURLRequestContext ------------------------------------------------ 43 // ExperimentURLRequestContext ------------------------------------------------
43 44
44 // An instance of ExperimentURLRequestContext is created for each experiment 45 // An instance of ExperimentURLRequestContext is created for each experiment
(...skipping 27 matching lines...) Expand all
72 73
73 // The rest of the dependencies are standard, and don't depend on the 74 // The rest of the dependencies are standard, and don't depend on the
74 // experiment being run. 75 // experiment being run.
75 storage_.set_cert_verifier(net::CertVerifier::CreateDefault()); 76 storage_.set_cert_verifier(net::CertVerifier::CreateDefault());
76 storage_.set_ftp_transaction_factory( 77 storage_.set_ftp_transaction_factory(
77 new net::FtpNetworkLayer(host_resolver())); 78 new net::FtpNetworkLayer(host_resolver()));
78 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults); 79 storage_.set_ssl_config_service(new net::SSLConfigServiceDefaults);
79 storage_.set_http_auth_handler_factory( 80 storage_.set_http_auth_handler_factory(
80 net::HttpAuthHandlerFactory::CreateDefault(host_resolver())); 81 net::HttpAuthHandlerFactory::CreateDefault(host_resolver()));
81 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl); 82 storage_.set_http_server_properties(new net::HttpServerPropertiesImpl);
83 storage_.set_throttler_manager(new net::URLRequestThrottlerManager);
82 84
83 net::HttpNetworkSession::Params session_params; 85 net::HttpNetworkSession::Params session_params;
84 session_params.host_resolver = host_resolver(); 86 session_params.host_resolver = host_resolver();
85 session_params.cert_verifier = cert_verifier(); 87 session_params.cert_verifier = cert_verifier();
86 session_params.proxy_service = proxy_service(); 88 session_params.proxy_service = proxy_service();
87 session_params.http_auth_handler_factory = http_auth_handler_factory(); 89 session_params.http_auth_handler_factory = http_auth_handler_factory();
88 session_params.http_server_properties = http_server_properties(); 90 session_params.http_server_properties = http_server_properties();
89 session_params.ssl_config_service = ssl_config_service(); 91 session_params.ssl_config_service = ssl_config_service();
90 scoped_refptr<net::HttpNetworkSession> network_session( 92 scoped_refptr<net::HttpNetworkSession> network_session(
91 new net::HttpNetworkSession(session_params)); 93 new net::HttpNetworkSession(session_params));
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 471
470 // Notify the delegate of completion. 472 // Notify the delegate of completion.
471 delegate_->OnCompletedConnectionTestExperiment(current, result); 473 delegate_->OnCompletedConnectionTestExperiment(current, result);
472 474
473 if (remaining_experiments_.empty()) { 475 if (remaining_experiments_.empty()) {
474 delegate_->OnCompletedConnectionTestSuite(); 476 delegate_->OnCompletedConnectionTestSuite();
475 } else { 477 } else {
476 StartNextExperiment(); 478 StartNextExperiment();
477 } 479 }
478 } 480 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698