Commit b7d654bb authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

Fix ResourceRequestsAllowedNotifier not being initialized on Android

VariationsService was not initializing ResourceRequestsAllowedNotifier
on the OS_ANDROID portion of the #ifdef, which was preventing it from
being notified of network changes.

This should fix the regressions in Variations.SeedFreshness on Android:
https://uma.googleplex.com/variations?sid=aeb0078452c432f2d6b3aa76b79354cd

Bug: 868021
Change-Id: I40eaeea5dbd97e87c5ed16c7161781e3f7f67659
Reviewed-on: https://chromium-review.googlesource.com/1213316Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589679}
parent 488a36e8
......@@ -1928,14 +1928,15 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate))
RegisterComponentsForUpdate(profile_->GetPrefs());
#if defined(OS_ANDROID)
variations::VariationsService* variations_service =
browser_process_->variations_service();
if (variations_service) {
// Just initialize the policy prefs service here. Variations seed fetching
// will be initialized when the app enters foreground mode.
variations_service->set_policy_pref_service(profile_->GetPrefs());
}
if (should_call_pre_main_loop_start_startup_on_variations_service_)
variations_service->PerformPreMainMessageLoopStartup();
#if defined(OS_ANDROID)
// Just initialize the policy prefs service here. Variations seed fetching
// will be initialized when the app enters foreground mode.
variations_service->set_policy_pref_service(profile_->GetPrefs());
#else
// Most general initialization is behind us, but opening a
......@@ -1994,14 +1995,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
const base::TimeDelta delta = base::TimeTicks::Now() - browser_open_start;
startup_metric_utils::RecordBrowserOpenTabsDelta(delta);
if (should_call_pre_main_loop_start_startup_on_variations_service_) {
// Request new variations seed information from server.
variations::VariationsService* variations_service =
browser_process_->variations_service();
if (variations_service)
variations_service->PerformPreMainMessageLoopStartup();
}
}
run_message_loop_ = started;
browser_creator_.reset();
......
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