Chromium Code Reviews| 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 1494d3bdab94aaff185911e0fbf9a5968b783cdd..e0b012185ebc3b6a4f9336a2f82023a48f9e5ed3 100644 |
| --- a/chrome/browser/metrics/variations/variations_service.cc |
| +++ b/chrome/browser/metrics/variations/variations_service.cc |
| @@ -257,6 +257,13 @@ void VariationsService::StartRepeatedVariationsSeedFetch() { |
| request_scheduler_->Start(); |
| } |
| +// TODO(rkaplow): Handle this and the similar event in metrics_service by |
| +// observing an 'OnAppEnterForeground' event instead of requiring the frontend |
| +// code to notify each service individually. |
|
Alexei Svitkine (slow)
2014/02/13 16:13:08
My previous comment meant to emphasize that in the
rkaplow
2014/02/13 16:55:59
Done.
|
| +void VariationsService::OnAppEnterForeground() { |
| + request_scheduler_->ScheduleFetch(); |
| +} |
| + |
| // static |
| GURL VariationsService::GetVariationsServerURL(PrefService* local_state) { |
| std::string server_url_string(CommandLine::ForCurrentProcess()-> |
| @@ -375,7 +382,7 @@ void VariationsService::OnURLFetchComplete(const net::URLFetcher* source) { |
| // may not yet be available). In such a case, try again soon, rather than |
| // waiting the full time interval. |
| if (is_first_request) |
| - request_scheduler_->ScheduleFetchShortly(); |
| + request_scheduler_->ForceFetch(); |
| return; |
| } |