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

Unified 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, 9 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
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index c4e0cd99ea99340dd0a1c09db223a65b0e501053..130b697009bbb8f8a21cba4b7d6ad2b1c69ef0a2 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -63,6 +63,7 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/metrics/metrics_pref_names.h"
+#include "components/metrics/metrics_service.h"
#include "components/net_log/chrome_net_log.h"
#include "components/policy/core/browser/url_blacklist_manager.h"
#include "components/policy/core/common/cloud/policy_header_io_helper.h"
@@ -545,6 +546,10 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
// are associated with each ResourceContext because we might post this
// object to the IO thread after this function.
BrowserContext::EnsureResourceContextInitialized(profile);
+
+ // Callback for updating data use prefs should be obtained on UI thread.
+ metrics_data_use_forwarder_ =
+ g_browser_process->metrics_service()->GetDataUseForwardingCallback();
mmenke 2016/04/04 17:26:23 Can we just grab the callback from the IOThread?
gayane -on leave until 09-2017 2016/04/05 14:26:46 Did you mean to get from IOThread object ? If so,
}
ProfileIOData::MediaRequestContext::MediaRequestContext() {
@@ -1016,14 +1021,13 @@ void ProfileIOData::Init(
main_request_context_.reset(new net::URLRequestContext());
extensions_request_context_.reset(new net::URLRequestContext());
- scoped_ptr<ChromeNetworkDelegate> network_delegate(
- new ChromeNetworkDelegate(
+ scoped_ptr<ChromeNetworkDelegate> network_delegate(new ChromeNetworkDelegate(
#if defined(ENABLE_EXTENSIONS)
- io_thread_globals->extension_event_router_forwarder.get(),
+ io_thread_globals->extension_event_router_forwarder.get(),
#else
- NULL,
+ NULL,
#endif
- &enable_referrers_));
+ &enable_referrers_, metrics_data_use_forwarder_));
#if defined(ENABLE_EXTENSIONS)
network_delegate->set_extension_info_map(
profile_params_->extension_info_map.get());

Powered by Google App Engine
This is Rietveld 408576698