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

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

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_util_unittest.cc
diff --git a/google_apis/gcm/base/mcs_util_unittest.cc b/google_apis/gcm/base/mcs_util_unittest.cc
index cef47facfa9f239e2181f2f256f354e4f4711807..4c6a9d604f2adbea8158f2167319f7d056e929af 100644
--- a/google_apis/gcm/base/mcs_util_unittest.cc
+++ b/google_apis/gcm/base/mcs_util_unittest.cc
@@ -7,9 +7,10 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
+
#include "base/bind.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,7 +23,7 @@ const uint64_t kAuthToken = 12345;
// Build a login request protobuf.
TEST(MCSUtilTest, BuildLoginRequest) {
- scoped_ptr<mcs_proto::LoginRequest> login_request =
+ std::unique_ptr<mcs_proto::LoginRequest> login_request =
BuildLoginRequest(kAuthId, kAuthToken, "1.0");
ASSERT_EQ("chrome-1.0", login_request->id());
ASSERT_EQ(base::Uint64ToString(kAuthToken), login_request->auth_token());
@@ -36,7 +37,7 @@ TEST(MCSUtilTest, BuildLoginRequest) {
// Test building a protobuf and extracting the tag from a protobuf.
TEST(MCSUtilTest, ProtobufToTag) {
for (uint8_t i = 0; i < kNumProtoTypes; ++i) {
- scoped_ptr<google::protobuf::MessageLite> protobuf =
+ std::unique_ptr<google::protobuf::MessageLite> protobuf =
BuildProtobufFromTag(i);
if (!protobuf.get()) // Not all tags have protobuf definitions.
continue;
@@ -53,7 +54,7 @@ TEST(MCSUtilTest, PersistentIds) {
};
for (size_t i = 0; i < arraysize(kTagsWithPersistentIds); ++i) {
int tag = kTagsWithPersistentIds[i];
- scoped_ptr<google::protobuf::MessageLite> protobuf =
+ std::unique_ptr<google::protobuf::MessageLite> protobuf =
BuildProtobufFromTag(tag);
ASSERT_TRUE(protobuf.get());
SetPersistentId(base::IntToString(tag), protobuf.get());
@@ -75,7 +76,7 @@ TEST(MCSUtilTest, StreamIds) {
};
for (size_t i = 0; i < arraysize(kTagsWithStreamIds); ++i) {
int tag = kTagsWithStreamIds[i];
- scoped_ptr<google::protobuf::MessageLite> protobuf =
+ std::unique_ptr<google::protobuf::MessageLite> protobuf =
BuildProtobufFromTag(tag);
ASSERT_TRUE(protobuf.get());
SetLastStreamIdReceived(tag, protobuf.get());

Powered by Google App Engine
This is Rietveld 408576698