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

Unified Diff: google_apis/gcm/base/mcs_message.cc

Issue 1547233002: Convert Pass()→std::move() in //google_apis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « google_apis/gaia/oauth2_token_service_request.cc ('k') | google_apis/gcm/base/mcs_message_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/base/mcs_message.cc
diff --git a/google_apis/gcm/base/mcs_message.cc b/google_apis/gcm/base/mcs_message.cc
index c3d51510bcfd84c950b4b646a15f31b867534b78..8673426a040c27a80bcece13472ceaed159e6f3f 100644
--- a/google_apis/gcm/base/mcs_message.cc
+++ b/google_apis/gcm/base/mcs_message.cc
@@ -4,6 +4,8 @@
#include "google_apis/gcm/base/mcs_message.h"
+#include <utility>
+
#include "base/logging.h"
#include "google_apis/gcm/base/mcs_util.h"
@@ -15,13 +17,13 @@ MCSMessage::Core::Core(uint8_t tag,
const google::protobuf::MessageLite& protobuf) {
scoped_ptr<google::protobuf::MessageLite> owned_protobuf(protobuf.New());
owned_protobuf->CheckTypeAndMergeFrom(protobuf);
- protobuf_ = owned_protobuf.Pass();
+ protobuf_ = std::move(owned_protobuf);
}
MCSMessage::Core::Core(
uint8_t tag,
scoped_ptr<const google::protobuf::MessageLite> protobuf) {
- protobuf_ = protobuf.Pass();
+ protobuf_ = std::move(protobuf);
}
MCSMessage::Core::~Core() {}
@@ -48,7 +50,7 @@ MCSMessage::MCSMessage(uint8_t tag,
scoped_ptr<const google::protobuf::MessageLite> protobuf)
: tag_(tag),
size_(protobuf->ByteSize()),
- core_(new Core(tag_, protobuf.Pass())) {
+ core_(new Core(tag_, std::move(protobuf))) {
DCHECK_EQ(tag, GetMCSProtoTag(core_->Get()));
}
@@ -70,7 +72,7 @@ const google::protobuf::MessageLite& MCSMessage::GetProtobuf() const {
scoped_ptr<google::protobuf::MessageLite> MCSMessage::CloneProtobuf() const {
scoped_ptr<google::protobuf::MessageLite> clone(GetProtobuf().New());
clone->CheckTypeAndMergeFrom(GetProtobuf());
- return clone.Pass();
+ return clone;
}
} // namespace gcm
« no previous file with comments | « google_apis/gaia/oauth2_token_service_request.cc ('k') | google_apis/gcm/base/mcs_message_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698