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

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

Issue 10375043: Variations Service now creates field trials from variations seed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
diff --git a/chrome/browser/metrics/variations_service.h b/chrome/browser/metrics/variations_service.h
index a15045e002f1b9b917965d643c7b965b17b44c03..4051ce57c40b003a75872e80a232b9a9224f83a3 100644
--- a/chrome/browser/metrics/variations_service.h
+++ b/chrome/browser/metrics/variations_service.h
@@ -27,9 +27,10 @@ class VariationsService : public content::URLFetcherDelegate {
// Returns the singleton instance;
static VariationsService* GetInstance();
- // Loads the Variations seed data from the given local prefs. If there is a
- // problem with loading, the pref value is cleared.
- void LoadVariationsSeed(PrefService* local_prefs);
+ // Creates field trials based on Variations Seed loaded from local prefs. If
+ // there is a problem loading the seed data, all trials specified by the seed
+ // may not be created.
+ bool CreateTrialsFromSeed(PrefService* local_prefs);
// Starts the fetching process, where |OnURLFetchComplete| is called with the
// response.
@@ -74,6 +75,15 @@ class VariationsService : public content::URLFetcherDelegate {
static bool CheckStudyDate(const chrome_variations::Study& study,
const base::Time& date_time);
+ // Loads the Variations seed data from the given local prefs into |seed|. If
+ // there is a problem with loading, the pref value is cleared and false is
+ // returned. If successful, |seed| will contain the loaded data and true is
+ // returned.
+ bool LoadVariationsSeed(PrefService* local_prefs,
Alexei Svitkine (slow) 2012/05/08 03:22:54 Better name: LoadTrialsSeedFromPrefs().
+ chrome_variations::TrialsSeed& seed);
MAD 2012/05/08 03:09:00 We don't use & for return argument, we use a * to
jwd 2012/05/08 03:30:01 Ah, oops, makes sense. DONE
+
+ void CreateTrialFromStudy(const chrome_variations::Study& study);
+
// Contains the current seed request. Will only have a value while a request
// is pending, and will be reset by |OnURLFetchComplete|.
scoped_ptr<content::URLFetcher> pending_seed_request_;

Powered by Google App Engine
This is Rietveld 408576698