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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 1818613002: Implement UMA log throttling for cellular connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « chrome/browser/net/chrome_network_delegate_unittest.cc ('k') | components/components_tests.gyp » ('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 "chrome/browser/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "chrome/common/pref_names.h" 56 #include "chrome/common/pref_names.h"
57 #include "chrome/common/url_constants.h" 57 #include "chrome/common/url_constants.h"
58 #include "components/about_handler/about_protocol_handler.h" 58 #include "components/about_handler/about_protocol_handler.h"
59 #include "components/content_settings/core/browser/content_settings_provider.h" 59 #include "components/content_settings/core/browser/content_settings_provider.h"
60 #include "components/content_settings/core/browser/cookie_settings.h" 60 #include "components/content_settings/core/browser/cookie_settings.h"
61 #include "components/content_settings/core/browser/host_content_settings_map.h" 61 #include "components/content_settings/core/browser/host_content_settings_map.h"
62 #include "components/cookie_config/cookie_store_util.h" 62 #include "components/cookie_config/cookie_store_util.h"
63 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h" 63 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h"
64 #include "components/dom_distiller/core/url_constants.h" 64 #include "components/dom_distiller/core/url_constants.h"
65 #include "components/metrics/metrics_pref_names.h" 65 #include "components/metrics/metrics_pref_names.h"
66 #include "components/metrics/metrics_service.h"
66 #include "components/net_log/chrome_net_log.h" 67 #include "components/net_log/chrome_net_log.h"
67 #include "components/policy/core/browser/url_blacklist_manager.h" 68 #include "components/policy/core/browser/url_blacklist_manager.h"
68 #include "components/policy/core/common/cloud/policy_header_io_helper.h" 69 #include "components/policy/core/common/cloud/policy_header_io_helper.h"
69 #include "components/policy/core/common/cloud/policy_header_service.h" 70 #include "components/policy/core/common/cloud/policy_header_service.h"
70 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" 71 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h"
71 #include "components/prefs/pref_service.h" 72 #include "components/prefs/pref_service.h"
72 #include "components/signin/core/common/signin_pref_names.h" 73 #include "components/signin/core/common/signin_pref_names.h"
73 #include "components/sync_driver/pref_names.h" 74 #include "components/sync_driver/pref_names.h"
74 #include "components/url_formatter/url_fixer.h" 75 #include "components/url_formatter/url_fixer.h"
75 #include "content/public/browser/browser_thread.h" 76 #include "content/public/browser/browser_thread.h"
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 1010
1010 IOThread* const io_thread = profile_params_->io_thread; 1011 IOThread* const io_thread = profile_params_->io_thread;
1011 IOThread::Globals* const io_thread_globals = io_thread->globals(); 1012 IOThread::Globals* const io_thread_globals = io_thread->globals();
1012 const base::CommandLine& command_line = 1013 const base::CommandLine& command_line =
1013 *base::CommandLine::ForCurrentProcess(); 1014 *base::CommandLine::ForCurrentProcess();
1014 1015
1015 // Create the common request contexts. 1016 // Create the common request contexts.
1016 main_request_context_.reset(new net::URLRequestContext()); 1017 main_request_context_.reset(new net::URLRequestContext());
1017 extensions_request_context_.reset(new net::URLRequestContext()); 1018 extensions_request_context_.reset(new net::URLRequestContext());
1018 1019
1019 scoped_ptr<ChromeNetworkDelegate> network_delegate( 1020 scoped_ptr<ChromeNetworkDelegate> network_delegate(new ChromeNetworkDelegate(
1020 new ChromeNetworkDelegate(
1021 #if defined(ENABLE_EXTENSIONS) 1021 #if defined(ENABLE_EXTENSIONS)
1022 io_thread_globals->extension_event_router_forwarder.get(), 1022 io_thread_globals->extension_event_router_forwarder.get(),
1023 #else 1023 #else
1024 NULL, 1024 NULL,
1025 #endif 1025 #endif
1026 &enable_referrers_)); 1026 &enable_referrers_, io_thread->GetMetricsDataUseForwarder()));
1027 #if defined(ENABLE_EXTENSIONS) 1027 #if defined(ENABLE_EXTENSIONS)
1028 network_delegate->set_extension_info_map( 1028 network_delegate->set_extension_info_map(
1029 profile_params_->extension_info_map.get()); 1029 profile_params_->extension_info_map.get());
1030 if (!command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling)) { 1030 if (!command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling)) {
1031 extension_throttle_manager_.reset( 1031 extension_throttle_manager_.reset(
1032 new extensions::ExtensionThrottleManager()); 1032 new extensions::ExtensionThrottleManager());
1033 } 1033 }
1034 #endif 1034 #endif
1035 1035
1036 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); 1036 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get());
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 make_scoped_ptr(new DevToolsNetworkTransactionFactory( 1319 make_scoped_ptr(new DevToolsNetworkTransactionFactory(
1320 network_controller_handle_.GetController(), shared_session)), 1320 network_controller_handle_.GetController(), shared_session)),
1321 std::move(backend), true /* set_up_quic_server_info */)); 1321 std::move(backend), true /* set_up_quic_server_info */));
1322 } 1322 }
1323 1323
1324 void ProfileIOData::SetCookieSettingsForTesting( 1324 void ProfileIOData::SetCookieSettingsForTesting(
1325 content_settings::CookieSettings* cookie_settings) { 1325 content_settings::CookieSettings* cookie_settings) {
1326 DCHECK(!cookie_settings_.get()); 1326 DCHECK(!cookie_settings_.get());
1327 cookie_settings_ = cookie_settings; 1327 cookie_settings_ = cookie_settings;
1328 } 1328 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate_unittest.cc ('k') | components/components_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698