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

Unified Diff: chrome/browser/metrics/variations_service.h

Issue 10828106: Support serial number requests in variations service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
Index: chrome/browser/metrics/variations_service.h
===================================================================
--- chrome/browser/metrics/variations_service.h (revision 149502)
+++ chrome/browser/metrics/variations_service.h (working copy)
@@ -40,7 +40,8 @@
bool CreateTrialsFromSeed(PrefService* local_prefs);
// Calls FetchVariationsSeed once and repeats this periodically. See
- // implementation for details on the period.
+ // implementation for details on the period. Must be called after
+ // |CreateTrialsFromSeed|.
void StartRepeatedVariationsSeedFetch();
// Starts the fetching process once, where |OnURLFetchComplete| is called with
@@ -127,9 +128,16 @@
// The URL to use for querying the variations server.
GURL variations_server_url_;
+ // Cached serial number from the most recently fetched variations seed.
+ std::string variations_serial_number_;
+
+ // Tracks whether |CreateTrialsFromSeed| has been called, to ensure that
+ // it gets called prior to |StartRepeatedVariationsSeedFetch|.
+ bool create_trials_from_seed_called_;
Ilya Sherman 2012/08/02 23:40:49 nit: This seems a little hacky. Is there any way
Alexei Svitkine (slow) 2012/08/02 23:51:02 I can't think of a good way - the issue is that it
+
// The timer used to repeatedly ping the server. Keep this as an instance
// member so if VariationsService goes out of scope, the timer is
- // automatically cancelled.
+ // automatically canceled.
base::RepeatingTimer<VariationsService> timer_;
};
« no previous file with comments | « no previous file | chrome/browser/metrics/variations_service.cc » ('j') | chrome/browser/metrics/variations_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698