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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 10834313: Add histograms for network activity, and total/cumulative (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/debug/leak_tracker.h" 13 #include "base/debug/leak_tracker.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/string_number_conversions.h" 16 #include "base/string_number_conversions.h"
17 #include "base/string_split.h" 17 #include "base/string_split.h"
18 #include "base/string_util.h" 18 #include "base/string_util.h"
19 #include "base/threading/thread.h" 19 #include "base/threading/thread.h"
20 #include "base/threading/worker_pool.h" 20 #include "base/threading/worker_pool.h"
21 #include "build/build_config.h" 21 #include "build/build_config.h"
22 #include "chrome/browser/browser_process.h" 22 #include "chrome/browser/browser_process.h"
23 #include "chrome/browser/extensions/event_router_forwarder.h" 23 #include "chrome/browser/extensions/event_router_forwarder.h"
24 #include "chrome/browser/net/cache_stats.h"
25 #include "chrome/browser/net/chrome_net_log.h" 24 #include "chrome/browser/net/chrome_net_log.h"
26 #include "chrome/browser/net/chrome_network_delegate.h" 25 #include "chrome/browser/net/chrome_network_delegate.h"
27 #include "chrome/browser/net/chrome_url_request_context.h" 26 #include "chrome/browser/net/chrome_url_request_context.h"
28 #include "chrome/browser/net/connect_interceptor.h" 27 #include "chrome/browser/net/connect_interceptor.h"
29 #include "chrome/browser/net/http_pipelining_compatibility_client.h" 28 #include "chrome/browser/net/http_pipelining_compatibility_client.h"
29 #include "chrome/browser/net/load_time_stats.h"
30 #include "chrome/browser/net/pref_proxy_config_tracker.h" 30 #include "chrome/browser/net/pref_proxy_config_tracker.h"
31 #include "chrome/browser/net/proxy_service_factory.h" 31 #include "chrome/browser/net/proxy_service_factory.h"
32 #include "chrome/browser/net/sdch_dictionary_fetcher.h" 32 #include "chrome/browser/net/sdch_dictionary_fetcher.h"
33 #include "chrome/browser/prefs/pref_service.h" 33 #include "chrome/browser/prefs/pref_service.h"
34 #include "chrome/common/chrome_switches.h" 34 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/pref_names.h" 35 #include "chrome/common/pref_names.h"
36 #include "content/public/browser/browser_thread.h" 36 #include "content/public/browser/browser_thread.h"
37 #include "content/public/common/content_client.h" 37 #include "content/public/common/content_client.h"
38 #include "net/base/cert_verifier.h" 38 #include "net/base/cert_verifier.h"
39 #include "net/base/default_server_bound_cert_store.h" 39 #include "net/base/default_server_bound_cert_store.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // For the ProxyScriptFetcher, we use a direct ProxyService. 421 // For the ProxyScriptFetcher, we use a direct ProxyService.
422 globals_->proxy_script_fetcher_proxy_service.reset( 422 globals_->proxy_script_fetcher_proxy_service.reset(
423 net::ProxyService::CreateDirectWithNetLog(net_log_)); 423 net::ProxyService::CreateDirectWithNetLog(net_log_));
424 // In-memory cookie store. 424 // In-memory cookie store.
425 globals_->system_cookie_store = new net::CookieMonster(NULL, NULL); 425 globals_->system_cookie_store = new net::CookieMonster(NULL, NULL);
426 // In-memory server bound cert store. 426 // In-memory server bound cert store.
427 globals_->system_server_bound_cert_service.reset( 427 globals_->system_server_bound_cert_service.reset(
428 new net::ServerBoundCertService( 428 new net::ServerBoundCertService(
429 new net::DefaultServerBoundCertStore(NULL), 429 new net::DefaultServerBoundCertStore(NULL),
430 base::WorkerPool::GetTaskRunner(true))); 430 base::WorkerPool::GetTaskRunner(true)));
431 globals_->cache_stats.reset(new chrome_browser_net::CacheStats()); 431 globals_->load_time_stats.reset(new chrome_browser_net::LoadTimeStats());
432 net::HttpNetworkSession::Params session_params; 432 net::HttpNetworkSession::Params session_params;
433 session_params.host_resolver = globals_->host_resolver.get(); 433 session_params.host_resolver = globals_->host_resolver.get();
434 session_params.cert_verifier = globals_->cert_verifier.get(); 434 session_params.cert_verifier = globals_->cert_verifier.get();
435 session_params.server_bound_cert_service = 435 session_params.server_bound_cert_service =
436 globals_->system_server_bound_cert_service.get(); 436 globals_->system_server_bound_cert_service.get();
437 session_params.transport_security_state = 437 session_params.transport_security_state =
438 globals_->transport_security_state.get(); 438 globals_->transport_security_state.get();
439 session_params.proxy_service = 439 session_params.proxy_service =
440 globals_->proxy_script_fetcher_proxy_service.get(); 440 globals_->proxy_script_fetcher_proxy_service.get();
441 session_params.http_auth_handler_factory = 441 session_params.http_auth_handler_factory =
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 new net::HttpNetworkLayer( 627 new net::HttpNetworkLayer(
628 new net::HttpNetworkSession(system_params))); 628 new net::HttpNetworkSession(system_params)));
629 globals_->system_ftp_transaction_factory.reset( 629 globals_->system_ftp_transaction_factory.reset(
630 new net::FtpNetworkLayer(globals_->host_resolver.get())); 630 new net::FtpNetworkLayer(globals_->host_resolver.get()));
631 globals_->system_request_context.reset( 631 globals_->system_request_context.reset(
632 ConstructSystemRequestContext(globals_, net_log_)); 632 ConstructSystemRequestContext(globals_, net_log_));
633 633
634 sdch_manager_->set_sdch_fetcher( 634 sdch_manager_->set_sdch_fetcher(
635 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); 635 new SdchDictionaryFetcher(system_url_request_context_getter_.get()));
636 } 636 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698