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

Unified Diff: chrome/browser/metrics/variations/variations_service_unittest.cc

Issue 1293113004: Introduce (Chrome)VariationsServiceClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self-review Created 5 years, 4 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/metrics/variations/variations_service.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39d3de4aaeeac6e27df119aa31cc90b10f7f526e..dee8dfa45d87c21d84c55fcc8449f62012fe7556 100644
--- a/chrome/browser/metrics/variations/variations_service_unittest.cc
+++ b/chrome/browser/metrics/variations/variations_service_unittest.cc
@@ -15,6 +15,7 @@
#include "base/strings/string_util.h"
#include "base/test/histogram_tester.h"
#include "base/version.h"
+#include "chrome/browser/metrics/variations/chrome_variations_service_client.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "components/variations/pref_names.h"
@@ -44,7 +45,10 @@ class TestVariationsService : public VariationsService {
public:
TestVariationsService(web_resource::TestRequestAllowedNotifier* test_notifier,
PrefService* local_state)
- : VariationsService(test_notifier, local_state, NULL),
+ : VariationsService(make_scoped_ptr(new ChromeVariationsServiceClient()),
+ test_notifier,
+ local_state,
+ NULL),
intercepts_fetch_(true),
fetch_attempted_(false),
seed_stored_(false) {
@@ -360,6 +364,7 @@ TEST_F(VariationsServiceTest, SeedNotStoredWhenNonOKStatus) {
VariationsService::RegisterPrefs(prefs.registry());
VariationsService service(
+ make_scoped_ptr(new ChromeVariationsServiceClient()),
new web_resource::TestRequestAllowedNotifier(&prefs), &prefs, NULL);
service.variations_server_url_ =
VariationsService::GetVariationsServerURL(&prefs, std::string());
@@ -405,6 +410,7 @@ TEST_F(VariationsServiceTest, Observer) {
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
VariationsService service(
+ make_scoped_ptr(new ChromeVariationsServiceClient()),
new web_resource::TestRequestAllowedNotifier(&prefs), &prefs, NULL);
struct {
@@ -503,6 +509,7 @@ TEST_F(VariationsServiceTest, LoadPermanentConsistencyCountry) {
TestingPrefServiceSimple prefs;
VariationsService::RegisterPrefs(prefs.registry());
VariationsService service(
+ make_scoped_ptr(new ChromeVariationsServiceClient()),
new web_resource::TestRequestAllowedNotifier(&prefs), &prefs, NULL);
if (test.pref_value_before) {
« no previous file with comments | « chrome/browser/metrics/variations/variations_service.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698