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

Unified Diff: chrome/browser/metrics/variations/variations_service.cc

Issue 880263005: Initialize variations seed fetching via OnAppEnterForeground. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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/chrome_browser_main.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/variations/variations_service.cc
diff --git a/chrome/browser/metrics/variations/variations_service.cc b/chrome/browser/metrics/variations/variations_service.cc
index c0b514515f642a0bb389f89b92174396ef2895aa..a359f5c10f497ff47a53f68f42472e305e4b6d87 100644
--- a/chrome/browser/metrics/variations/variations_service.cc
+++ b/chrome/browser/metrics/variations/variations_service.cc
@@ -351,12 +351,11 @@ void VariationsService::RemoveObserver(Observer* observer) {
observer_list_.RemoveObserver(observer);
}
-// TODO(rkaplow): Handle this and the similar event in metrics_service by
-// observing an 'OnAppEnterForeground' event in RequestScheduler instead of
-// requiring the frontend code to notify each service individually. Since the
-// scheduler will handle it directly the VariationService shouldn't need to
-// know details of this anymore.
void VariationsService::OnAppEnterForeground() {
+ // On mobile platforms, initialize the fetch scheduler when we receive the
+ // first app foreground notification.
+ if (!request_scheduler_)
+ StartRepeatedVariationsSeedFetch();
request_scheduler_->OnAppEnterForeground();
}
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698