| Index: chrome/browser/metrics/variations/variations_service_unittest.cc
|
| diff --git a/chrome/browser/metrics/variations/variations_service_unittest.cc b/chrome/browser/metrics/variations/variations_service_unittest.cc
|
| index aea69feb1bd60d4f5596e11a14e8fbd5654cef40..dee8dfa45d87c21d84c55fcc8449f62012fe7556 100644
|
| --- a/chrome/browser/metrics/variations/variations_service_unittest.cc
|
| +++ b/chrome/browser/metrics/variations/variations_service_unittest.cc
|
| @@ -264,22 +264,20 @@
|
| VariationsService::GetDefaultVariationsServerURLForTesting();
|
|
|
| std::string value;
|
| - TestVariationsService service(
|
| - new web_resource::TestRequestAllowedNotifier(prefs), prefs);
|
| - GURL url = service.GetVariationsServerURL(prefs, std::string());
|
| + GURL url = VariationsService::GetVariationsServerURL(prefs, std::string());
|
| EXPECT_TRUE(base::StartsWith(url.spec(), default_variations_url,
|
| base::CompareCase::SENSITIVE));
|
| EXPECT_FALSE(net::GetValueForKeyInQuery(url, "restrict", &value));
|
|
|
| prefs_store.SetVariationsRestrictParameterPolicyValue("restricted");
|
| - url = service.GetVariationsServerURL(prefs, std::string());
|
| + url = VariationsService::GetVariationsServerURL(prefs, std::string());
|
| EXPECT_TRUE(base::StartsWith(url.spec(), default_variations_url,
|
| base::CompareCase::SENSITIVE));
|
| EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value));
|
| EXPECT_EQ("restricted", value);
|
|
|
| // The override value should take precedence over what's in prefs.
|
| - url = service.GetVariationsServerURL(prefs, "override");
|
| + url = VariationsService::GetVariationsServerURL(prefs, "override");
|
| EXPECT_TRUE(base::StartsWith(url.spec(), default_variations_url,
|
| base::CompareCase::SENSITIVE));
|
| EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value));
|
| @@ -289,9 +287,8 @@
|
| TEST_F(VariationsServiceTest, VariationsURLHasOSNameParam) {
|
| TestingPrefServiceSimple prefs;
|
| VariationsService::RegisterPrefs(prefs.registry());
|
| - TestVariationsService service(
|
| - new web_resource::TestRequestAllowedNotifier(&prefs), &prefs);
|
| - const GURL url = service.GetVariationsServerURL(&prefs, std::string());
|
| + const GURL url =
|
| + VariationsService::GetVariationsServerURL(&prefs, std::string());
|
|
|
| std::string value;
|
| EXPECT_TRUE(net::GetValueForKeyInQuery(url, "osname", &value));
|
| @@ -339,7 +336,7 @@
|
| TestVariationsService service(
|
| new web_resource::TestRequestAllowedNotifier(&prefs), &prefs);
|
| service.variations_server_url_ =
|
| - service.GetVariationsServerURL(&prefs, std::string());
|
| + VariationsService::GetVariationsServerURL(&prefs, std::string());
|
| service.set_intercepts_fetch(false);
|
|
|
| net::TestURLFetcherFactory factory;
|
| @@ -370,7 +367,7 @@
|
| make_scoped_ptr(new ChromeVariationsServiceClient()),
|
| new web_resource::TestRequestAllowedNotifier(&prefs), &prefs, NULL);
|
| service.variations_server_url_ =
|
| - service.GetVariationsServerURL(&prefs, std::string());
|
| + VariationsService::GetVariationsServerURL(&prefs, std::string());
|
| for (size_t i = 0; i < arraysize(non_ok_status_codes); ++i) {
|
| net::TestURLFetcherFactory factory;
|
| service.DoActualFetch();
|
| @@ -391,7 +388,7 @@
|
| TestVariationsService service(
|
| new web_resource::TestRequestAllowedNotifier(&prefs), &prefs);
|
| service.variations_server_url_ =
|
| - service.GetVariationsServerURL(&prefs, std::string());
|
| + VariationsService::GetVariationsServerURL(&prefs, std::string());
|
| service.set_intercepts_fetch(false);
|
|
|
| net::TestURLFetcherFactory factory;
|
|
|