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..8b50c6e5991a3c1949707c83c05fae3e40a7da2b 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,17 @@ void VariationsService::RegisterPrefs(PrefServiceSimple* prefs) { |
base::Time().ToInternalValue()); |
} |
-void VariationsService::SetCreateTrialsFromSeedCalledForTesting(bool called) { |
- create_trials_from_seed_called_ = called; |
+// static |
+VariationsService* VariationsService::Create() { |
+// This is temporarily disabled for Android. See http://crbug.com/168224 |
+#if !defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID) |
+ // Unless the URL was provided, unsupported builds should return NULL to |
+ // indicate that the service should not be used. |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kVariationsServerURL)) |
+ return NULL; |
+#endif |
+ return new VariationsService; |
} |
void VariationsService::DoActualFetch() { |