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

Unified Diff: sync/syncable/model_type_unittest.cc

Issue 1866243002: Convert //sync 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: sync/syncable/model_type_unittest.cc
diff --git a/sync/syncable/model_type_unittest.cc b/sync/syncable/model_type_unittest.cc
index a60b7cf566e108596103f68fbca50bcc70882e75..84b0718eb1e0ad6eb59c47c8210d3e64d441204a 100644
--- a/sync/syncable/model_type_unittest.cc
+++ b/sync/syncable/model_type_unittest.cc
@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/internal_api/public/base/model_type.h"
-
+#include <memory>
#include <string>
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "base/test/values_test_util.h"
#include "base/values.h"
+#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -33,7 +32,7 @@ TEST_F(ModelTypeTest, ModelTypeToValue) {
TEST_F(ModelTypeTest, ModelTypeFromValue) {
for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) {
ModelType model_type = ModelTypeFromInt(i);
- scoped_ptr<base::StringValue> value(ModelTypeToValue(model_type));
+ std::unique_ptr<base::StringValue> value(ModelTypeToValue(model_type));
EXPECT_EQ(model_type, ModelTypeFromValue(*value));
}
}
@@ -41,7 +40,7 @@ TEST_F(ModelTypeTest, ModelTypeFromValue) {
TEST_F(ModelTypeTest, ModelTypeSetToValue) {
const ModelTypeSet model_types(BOOKMARKS, APPS);
- scoped_ptr<base::ListValue> value(ModelTypeSetToValue(model_types));
+ std::unique_ptr<base::ListValue> value(ModelTypeSetToValue(model_types));
EXPECT_EQ(2u, value->GetSize());
std::string types[2];
EXPECT_TRUE(value->GetString(0, &types[0]));
@@ -53,7 +52,7 @@ TEST_F(ModelTypeTest, ModelTypeSetToValue) {
TEST_F(ModelTypeTest, ModelTypeSetFromValue) {
// Try empty set first.
ModelTypeSet model_types;
- scoped_ptr<base::ListValue> value(ModelTypeSetToValue(model_types));
+ std::unique_ptr<base::ListValue> value(ModelTypeSetToValue(model_types));
EXPECT_TRUE(model_types.Equals(ModelTypeSetFromValue(*value)));
// Now try with a few random types.

Powered by Google App Engine
This is Rietveld 408576698