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

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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/metrics/variations_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..11ee73618c23d52e34629309a367e86a8762b907 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 LoadTrialsSeedFromPref(PrefService* local_prefs,
+ chrome_variations::TrialsSeed* seed);
+
+ 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_;
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/metrics/variations_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698