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

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

Issue 11753014: Enable the VariationsService on official builds when --variations-service-url is provided. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 12 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/browser_process_impl.cc ('k') | chrome/browser/metrics/variations/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/variations_service.h
diff --git a/chrome/browser/metrics/variations/variations_service.h b/chrome/browser/metrics/variations/variations_service.h
index 5a363874deafeb12d1c1abf36b7811bc7c3052de..380bd8eb31be91cb5a3a12216410f6d3706d6a83 100644
--- a/chrome/browser/metrics/variations/variations_service.h
+++ b/chrome/browser/metrics/variations/variations_service.h
@@ -31,12 +31,6 @@ class VariationsService
: public net::URLFetcherDelegate,
public ResourceRequestAllowedNotifier::Observer {
public:
- VariationsService();
-
- // This constructor exists for injecting a mock notifier. It is meant for
- // testing only. This instance will take ownership of |notifier|.
- explicit VariationsService(ResourceRequestAllowedNotifier* notifier);
-
virtual ~VariationsService();
// Creates field trials based on Variations Seed loaded from local prefs. If
@@ -49,17 +43,24 @@ class VariationsService
// |CreateTrialsFromSeed|.
void StartRepeatedVariationsSeedFetch();
+ // Exposed for testing.
+ void SetCreateTrialsFromSeedCalledForTesting(bool called);
+
// Register Variations related prefs in Local State.
static void RegisterPrefs(PrefServiceSimple* prefs);
- // Exposed for testing.
- void SetCreateTrialsFromSeedCalledForTesting(bool called);
+ // Factory method for creating a VariationsService.
+ static VariationsService* Create();
protected:
// Starts the fetching process once, where |OnURLFetchComplete| is called with
// the response.
virtual void DoActualFetch();
+ // This constructor exists for injecting a mock notifier. It is meant for
+ // testing only. This instance will take ownership of |notifier|.
+ explicit VariationsService(ResourceRequestAllowedNotifier* notifier);
+
private:
FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyChannel);
FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyLocale);
@@ -75,6 +76,10 @@ class VariationsService
FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, StoreSeed);
FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, ValidateStudy);
+ // Default constructor is private. Use the |Create| factory method to create a
+ // VariationsService.
+ VariationsService();
+
// Checks if prerequisites for fetching the Variations seed are met, and if
// so, performs the actual fetch using |DoActualFetch|.
void FetchVariationsSeed();
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/metrics/variations/variations_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698