summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_process_impl.cc
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-17 15:55:39 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-17 15:55:39 +0000
commita178ed29bc50573f019998272f045683a66ea68f (patch)
tree22c13feffe9965364b8536e945777c56c01d1497 /chrome/browser/browser_process_impl.cc
parente8632b2278e000c2dd336b91371f3bbe9539c318 (diff)
downloadchromium_src-a178ed29bc50573f019998272f045683a66ea68f.zip
chromium_src-a178ed29bc50573f019998272f045683a66ea68f.tar.gz
chromium_src-a178ed29bc50573f019998272f045683a66ea68f.tar.bz2
Fix the observer of the kMetricsReportingEnabled pref.
This observer makes sure that the "Consent To Send Stats" file follows the value of the kMetricsReportingEnabled pref, which can be configured by the user or by management policy. However, OptionsUtil::ResolveMetricsReportingEnabled also Starts/Stops the MetricsService but it should never start under some conditions (e.g. on non-official builds). This fix calls GoogleUpdateSettings::SetCollectStatsConsent directly to update the state of the file, without changing the current state of the MetricsService. BUG=318761 R=jochen@chromium.org Review URL: https://codereview.chromium.org/68503015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235527 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r--chrome/browser/browser_process_impl.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 161c5f8..5db8e49 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -110,7 +110,6 @@
#if !defined(OS_ANDROID) && !defined(OS_IOS)
#include "chrome/browser/media_galleries/media_file_system_registry.h"
-#include "chrome/browser/ui/options/options_util.h"
#endif
#if defined(ENABLE_PLUGIN_INSTALLATION)
@@ -1041,8 +1040,11 @@ void BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy() {
void BrowserProcessImpl::ApplyMetricsReportingPolicy() {
#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS)
- OptionsUtil::ResolveMetricsReportingEnabled(
- local_state()->GetBoolean(prefs::kMetricsReportingEnabled));
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
+ base::Bind(
+ base::IgnoreResult(&GoogleUpdateSettings::SetCollectStatsConsent),
+ local_state()->GetBoolean(prefs::kMetricsReportingEnabled)));
#endif
}