Commit fc0cd317 authored by jochen@chromium.org's avatar jochen@chromium.org

Delay setting the consent to send settings until after threads are running

BUG=333847
R=joaodasilva@chromium.org

Review URL: https://codereview.chromium.org/136713002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244499 0039d316-1c4b-4281-b951-d872f2087c98
parent e1803f81
......@@ -895,7 +895,6 @@ void BrowserProcessImpl::CreateLocalState() {
prefs::kMetricsReportingEnabled,
base::Bind(&BrowserProcessImpl::ApplyMetricsReportingPolicy,
base::Unretained(this)));
ApplyMetricsReportingPolicy();
#endif
int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy);
......@@ -925,6 +924,10 @@ void BrowserProcessImpl::PreMainMessageLoopRun() {
if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled))
ApplyDefaultBrowserPolicy();
#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS)
ApplyMetricsReportingPolicy();
#endif
#if defined(ENABLE_PLUGINS)
PluginService* plugin_service = PluginService::GetInstance();
plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance());
......@@ -1050,11 +1053,11 @@ void BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy() {
void BrowserProcessImpl::ApplyMetricsReportingPolicy() {
#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS)
BrowserThread::PostTask(
CHECK(BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(
base::IgnoreResult(&GoogleUpdateSettings::SetCollectStatsConsent),
local_state()->GetBoolean(prefs::kMetricsReportingEnabled)));
local_state()->GetBoolean(prefs::kMetricsReportingEnabled))));
#endif
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment