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() { ...@@ -895,7 +895,6 @@ void BrowserProcessImpl::CreateLocalState() {
prefs::kMetricsReportingEnabled, prefs::kMetricsReportingEnabled,
base::Bind(&BrowserProcessImpl::ApplyMetricsReportingPolicy, base::Bind(&BrowserProcessImpl::ApplyMetricsReportingPolicy,
base::Unretained(this))); base::Unretained(this)));
ApplyMetricsReportingPolicy();
#endif #endif
int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy); int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy);
...@@ -925,6 +924,10 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { ...@@ -925,6 +924,10 @@ void BrowserProcessImpl::PreMainMessageLoopRun() {
if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled))
ApplyDefaultBrowserPolicy(); ApplyDefaultBrowserPolicy();
#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS)
ApplyMetricsReportingPolicy();
#endif
#if defined(ENABLE_PLUGINS) #if defined(ENABLE_PLUGINS)
PluginService* plugin_service = PluginService::GetInstance(); PluginService* plugin_service = PluginService::GetInstance();
plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance()); plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance());
...@@ -1050,11 +1053,11 @@ void BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy() { ...@@ -1050,11 +1053,11 @@ void BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy() {
void BrowserProcessImpl::ApplyMetricsReportingPolicy() { void BrowserProcessImpl::ApplyMetricsReportingPolicy() {
#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS) #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS)
BrowserThread::PostTask( CHECK(BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE, BrowserThread::FILE, FROM_HERE,
base::Bind( base::Bind(
base::IgnoreResult(&GoogleUpdateSettings::SetCollectStatsConsent), base::IgnoreResult(&GoogleUpdateSettings::SetCollectStatsConsent),
local_state()->GetBoolean(prefs::kMetricsReportingEnabled))); local_state()->GetBoolean(prefs::kMetricsReportingEnabled))));
#endif #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