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

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: Add default value for device setting 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
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/resources/options/browser_options.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83fe26b7f78a4ece728ab1205f510cdec74b3572..4a2bd2bcd93a7e63b8848fd614cedf40b33ef632 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -866,14 +866,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.
@@ -888,16 +881,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 {
@@ -1258,9 +1247,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();
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/resources/options/browser_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698