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

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

Issue 1873663002: Convert //google_apis from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: google_apis/gcm/base/mcs_message.h
diff --git a/google_apis/gcm/base/mcs_message.h b/google_apis/gcm/base/mcs_message.h
index a5d327af0ec294d891dbb4332fb48c2d3f9cb838..8be139c6855d3cf8d3a99364d75736a8c02f292a 100644
--- a/google_apis/gcm/base/mcs_message.h
+++ b/google_apis/gcm/base/mcs_message.h
@@ -7,11 +7,11 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "google_apis/gcm/base/gcm_export.h"
namespace google {
@@ -37,7 +37,7 @@ class GCM_EXPORT MCSMessage {
MCSMessage(uint8_t tag, const google::protobuf::MessageLite& protobuf);
// |tag| must match |protobuf|'s message type. Takes ownership of |protobuf|.
MCSMessage(uint8_t tag,
- scoped_ptr<const google::protobuf::MessageLite> protobuf);
+ std::unique_ptr<const google::protobuf::MessageLite> protobuf);
MCSMessage(const MCSMessage& other);
~MCSMessage();
@@ -54,14 +54,15 @@ class GCM_EXPORT MCSMessage {
const google::protobuf::MessageLite& GetProtobuf() const;
// Getter for creating a mutated version of the protobuf.
- scoped_ptr<google::protobuf::MessageLite> CloneProtobuf() const;
+ std::unique_ptr<google::protobuf::MessageLite> CloneProtobuf() const;
private:
class Core : public base::RefCountedThreadSafe<MCSMessage::Core> {
public:
Core();
Core(uint8_t tag, const google::protobuf::MessageLite& protobuf);
- Core(uint8_t tag, scoped_ptr<const google::protobuf::MessageLite> protobuf);
+ Core(uint8_t tag,
+ std::unique_ptr<const google::protobuf::MessageLite> protobuf);
const google::protobuf::MessageLite& Get() const;
@@ -70,7 +71,7 @@ class GCM_EXPORT MCSMessage {
~Core();
// The immutable protobuf.
- scoped_ptr<const google::protobuf::MessageLite> protobuf_;
+ std::unique_ptr<const google::protobuf::MessageLite> protobuf_;
DISALLOW_COPY_AND_ASSIGN(Core);
};

Powered by Google App Engine
This is Rietveld 408576698