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 b4e12da5b1bb716dbe4b3ddb0f88b9d6b3ae6461..6e9b6e72c655741ddb2ab1ef67c5a1ed9d188a7c 100644 |
--- a/chrome/browser/metrics/variations/variations_service.cc |
+++ b/chrome/browser/metrics/variations/variations_service.cc |
@@ -159,6 +159,10 @@ void VariationsService::StartRepeatedVariationsSeedFetch() { |
this, &VariationsService::FetchVariationsSeed); |
} |
+void VariationsService::SetCreateTrialsFromSeedCalledForTesting(bool called) { |
+ create_trials_from_seed_called_ = called; |
+} |
+ |
// static |
void VariationsService::RegisterPrefs(PrefServiceSimple* prefs) { |
prefs->RegisterStringPref(prefs::kVariationsSeed, std::string()); |
@@ -166,8 +170,16 @@ void VariationsService::RegisterPrefs(PrefServiceSimple* prefs) { |
base::Time().ToInternalValue()); |
} |
-void VariationsService::SetCreateTrialsFromSeedCalledForTesting(bool called) { |
- create_trials_from_seed_called_ = called; |
+// static |
+VariationsService* VariationsService::Create() { |
+#if defined(GOOGLE_CHROME_BUILD) && !defined(OS_ANDROID) |
Alexei Svitkine (slow)
2013/01/03 20:14:06
Do we have a bug tracking the !ANDROID part? If so
SteveT
2013/01/03 20:35:42
Done.
|
+ // Unless the URL was provided, unsupported builds should return NULL to |
Alexei Svitkine (slow)
2013/01/03 20:14:06
I think "unofficial" is the correct term.
SteveT
2013/01/03 20:35:42
So I originally used unofficial, but I changed the
Alexei Svitkine (slow)
2013/01/03 20:40:42
Ah, makes sense. OK.
|
+ // indicate that the service should not be used. |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kVariationsServerURL)) |
+ return NULL; |
+#endif |
+ return new VariationsService; |
} |
void VariationsService::DoActualFetch() { |