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

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

Issue 1306913003: Revert of Turn VariationsService::GetVariationsServerURL into instance method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
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 ee5f0eb40c952552d033bfe45e9f5af3832554f4..642b1ef3affb73efb01b9833a828e473e5ee8040 100644
--- a/chrome/browser/metrics/variations/variations_service.cc
+++ b/chrome/browser/metrics/variations/variations_service.cc
@@ -210,7 +210,7 @@
VariationsService::VariationsService(
scoped_ptr<VariationsServiceClient> client,
- scoped_ptr<web_resource::ResourceRequestAllowedNotifier> notifier,
+ web_resource::ResourceRequestAllowedNotifier* notifier,
PrefService* local_state,
metrics::MetricsStateManager* state_manager)
: client_(client.Pass()),
@@ -221,7 +221,7 @@
create_trials_from_seed_called_(false),
initial_request_completed_(false),
disable_deltas_for_next_request_(false),
- resource_request_allowed_notifier_(notifier.Pass()),
+ resource_request_allowed_notifier_(notifier),
request_count_(0),
weak_ptr_factory_(this) {
resource_request_allowed_notifier_->Init(this);
@@ -365,6 +365,7 @@
create_trials_from_seed_called_ = called;
}
+// static
GURL VariationsService::GetVariationsServerURL(
PrefService* policy_pref_service,
const std::string& restrict_mode_override) {
@@ -435,18 +436,10 @@
}
#endif
result.reset(new VariationsService(
- client.Pass(),
- make_scoped_ptr(new web_resource::ResourceRequestAllowedNotifier(
- local_state, disable_network_switch)),
+ client.Pass(), new web_resource::ResourceRequestAllowedNotifier(
+ local_state, disable_network_switch),
local_state, state_manager));
return result.Pass();
-}
-
-// static
-scoped_ptr<VariationsService> VariationsService::CreateForTesting(
- scoped_ptr<VariationsServiceClient> client,
- PrefService* local_state) {
- return Create(client.Pass(), local_state, nullptr, nullptr);
}
void VariationsService::DoActualFetch() {

Powered by Google App Engine
This is Rietveld 408576698