Chromium Code Reviews| 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..53d29f35379828c631a5fa70f19d92a09c20a4b5 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() { |
| +// See http://crbug.com/168224 |
|
Alexei Svitkine (slow)
2013/01/03 20:40:42
Indent 2. Make the comment mention android, otherw
SteveT
2013/01/03 20:46:39
Done.
|
| +#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() { |