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

Unified Diff: mojo/services/test_service/tracked_service.cc

Issue 1539863002: Convert Pass()→std::move() in mojo/services/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing forward declare that was masked by pre-existing incorrect #include ordering. 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: mojo/services/test_service/tracked_service.cc
diff --git a/mojo/services/test_service/tracked_service.cc b/mojo/services/test_service/tracked_service.cc
index a2fedfc9bb6ce6a9dbcf958b8e9511a325f198d3..544183e10be6f6c4ba8464d9ea1f951e153a6433 100644
--- a/mojo/services/test_service/tracked_service.cc
+++ b/mojo/services/test_service/tracked_service.cc
@@ -4,6 +4,8 @@
#include "mojo/services/test_service/tracked_service.h"
+#include <utility>
+
#include "base/bind.h"
namespace mojo {
@@ -15,7 +17,7 @@ TrackedService::TrackedService(TestRequestTrackerPtr tracker,
: id_(0u),
requests_since_upload_(0u),
service_name_(service_name),
- tracker_(tracker.Pass()),
+ tracker_(std::move(tracker)),
tracking_connected_callback_(callback) {
tracker_->SetNameAndReturnId(
service_name, base::Bind(&TrackedService::SetId, base::Unretained(this)));
@@ -35,7 +37,7 @@ void TrackedService::SendStats() {
ServiceStatsPtr stats(ServiceStats::New());
stats->num_new_requests = requests_since_upload_;
stats->health = 0.7;
- tracker_->RecordStats(id_, stats.Pass());
+ tracker_->RecordStats(id_, std::move(stats));
requests_since_upload_ = 0u;
}
« no previous file with comments | « mojo/services/test_service/test_time_service_impl.cc ('k') | mojo/services/tracing/public/cpp/trace_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698