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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 1411863002: Use kMetricsReportingEnabled instead of kStatsReporingPref on metrics side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits comments TODOs Created 5 years, 1 month 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 3e331d5d8d0ca216f1269f907649fb33d187b24a..2f94ce8a816c45df33cbd2b62c6b0d9424b66853 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -872,14 +872,7 @@ bool ProfileIOData::IsOffTheRecord() const {
void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
-#if defined(OS_CHROMEOS)
- // Just fetch the value from ChromeOS' settings while we're on the UI thread.
- // TODO(stevet): For now, this value is only set on profile initialization.
- // We will want to do something similar to the PrefMember method below in the
- // future to more accurately capture this state.
- chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref,
- &enable_metrics_);
-#elif defined(OS_ANDROID)
+#if defined(OS_ANDROID)
// TODO(dwkang): rename or unify the pref for UMA once we have conclusion
// in crbugs.com/246495.
// Android has it's own preferences for metrics / crash uploading.
@@ -894,16 +887,12 @@ void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() {
g_browser_process->local_state());
enable_metrics_.MoveToThread(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
-#endif // defined(OS_CHROMEOS)
+#endif // defined(OS_ANDROID)
}
bool ProfileIOData::GetMetricsEnabledStateOnIOThread() const {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
-#if defined(OS_CHROMEOS)
- return enable_metrics_;
-#else
return enable_metrics_.GetValue();
-#endif // defined(OS_CHROMEOS)
}
bool ProfileIOData::IsDataReductionProxyEnabled() const {
@@ -1264,9 +1253,7 @@ void ProfileIOData::ShutdownOnUIThread(
enable_do_not_track_.Destroy();
force_google_safesearch_.Destroy();
force_youtube_safety_mode_.Destroy();
-#if !defined(OS_CHROMEOS)
enable_metrics_.Destroy();
-#endif
safe_browsing_enabled_.Destroy();
sync_disabled_.Destroy();
signin_allowed_.Destroy();

Powered by Google App Engine
This is Rietveld 408576698