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

Unified Diff: components/variations/service/variations_service.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 5 years 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: components/variations/service/variations_service.cc
diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc
index a3007470a88bcd3e445172772994790c684b84c7..3d41ce3c7643455d971fba59b1625bf29c4af07b 100644
--- a/components/variations/service/variations_service.cc
+++ b/components/variations/service/variations_service.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <utility>
#include "base/build_time.h"
#include "base/command_line.h"
@@ -276,7 +277,7 @@ VariationsService::VariationsService(
PrefService* local_state,
metrics::MetricsStateManager* state_manager,
const UIStringOverrider& ui_string_overrider)
- : client_(client.Pass()),
+ : client_(std::move(client)),
ui_string_overrider_(ui_string_overrider),
local_state_(local_state),
state_manager_(state_manager),
@@ -285,7 +286,7 @@ VariationsService::VariationsService(
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_(std::move(notifier)),
request_count_(0),
weak_ptr_factory_(this) {
DCHECK(client_.get());
@@ -493,15 +494,15 @@ scoped_ptr<VariationsService> VariationsService::Create(
switches::kVariationsServerURL)) {
DVLOG(1) << "Not creating VariationsService in unofficial build without --"
<< switches::kVariationsServerURL << " specified.";
- return result.Pass();
+ return result;
}
#endif
result.reset(new VariationsService(
- client.Pass(),
+ std::move(client),
make_scoped_ptr(new web_resource::ResourceRequestAllowedNotifier(
local_state, disable_network_switch)),
local_state, state_manager, ui_string_overrider));
- return result.Pass();
+ return result;
}
// static
@@ -509,7 +510,7 @@ scoped_ptr<VariationsService> VariationsService::CreateForTesting(
scoped_ptr<VariationsServiceClient> client,
PrefService* local_state) {
return make_scoped_ptr(new VariationsService(
- client.Pass(),
+ std::move(client),
make_scoped_ptr(new web_resource::ResourceRequestAllowedNotifier(
local_state, nullptr)),
local_state, nullptr, UIStringOverrider()));

Powered by Google App Engine
This is Rietveld 408576698