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

Unified Diff: sync/api/sync_change_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/api/sync_change_unittest.cc
diff --git a/sync/api/sync_change_unittest.cc b/sync/api/sync_change_unittest.cc
index 919fe53233cdc593f32f4ec4b4dba1836a19c69f..84f39716908ab68bf09ff2daf919c79fe44767da 100644
--- a/sync/api/sync_change_unittest.cc
+++ b/sync/api/sync_change_unittest.cc
@@ -4,9 +4,9 @@
#include "sync/api/sync_change.h"
+#include <memory>
#include <string>
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/time/time.h"
#include "base/values.h"
@@ -54,9 +54,10 @@ TEST_F(SyncChangeTest, LocalUpdate) {
EXPECT_EQ(tag, SyncDataLocal(e.sync_data()).GetTag());
EXPECT_EQ(title, e.sync_data().GetTitle());
EXPECT_EQ(PREFERENCES, e.sync_data().GetDataType());
- scoped_ptr<base::DictionaryValue> ref_spec(EntitySpecificsToValue(specifics));
- scoped_ptr<base::DictionaryValue> e_spec(EntitySpecificsToValue(
- e.sync_data().GetSpecifics()));
+ std::unique_ptr<base::DictionaryValue> ref_spec(
+ EntitySpecificsToValue(specifics));
+ std::unique_ptr<base::DictionaryValue> e_spec(
+ EntitySpecificsToValue(e.sync_data().GetSpecifics()));
EXPECT_TRUE(ref_spec->Equals(e_spec.get()));
}
@@ -74,9 +75,10 @@ TEST_F(SyncChangeTest, LocalAdd) {
EXPECT_EQ(tag, SyncDataLocal(e.sync_data()).GetTag());
EXPECT_EQ(title, e.sync_data().GetTitle());
EXPECT_EQ(PREFERENCES, e.sync_data().GetDataType());
- scoped_ptr<base::DictionaryValue> ref_spec(EntitySpecificsToValue(specifics));
- scoped_ptr<base::DictionaryValue> e_spec(EntitySpecificsToValue(
- e.sync_data().GetSpecifics()));
+ std::unique_ptr<base::DictionaryValue> ref_spec(
+ EntitySpecificsToValue(specifics));
+ std::unique_ptr<base::DictionaryValue> e_spec(
+ EntitySpecificsToValue(e.sync_data().GetSpecifics()));
EXPECT_TRUE(ref_spec->Equals(e_spec.get()));
}
@@ -132,10 +134,10 @@ TEST_F(SyncChangeTest, SyncerChanges) {
SyncChange e = change_list[0];
EXPECT_EQ(SyncChange::ACTION_UPDATE, e.change_type());
EXPECT_EQ(PREFERENCES, e.sync_data().GetDataType());
- scoped_ptr<base::DictionaryValue> ref_spec(EntitySpecificsToValue(
- update_specifics));
- scoped_ptr<base::DictionaryValue> e_spec(EntitySpecificsToValue(
- e.sync_data().GetSpecifics()));
+ std::unique_ptr<base::DictionaryValue> ref_spec(
+ EntitySpecificsToValue(update_specifics));
+ std::unique_ptr<base::DictionaryValue> e_spec(
+ EntitySpecificsToValue(e.sync_data().GetSpecifics()));
EXPECT_TRUE(ref_spec->Equals(e_spec.get()));
// Verify add.
« no previous file with comments | « sync/api/model_type_store.h ('k') | sync/api/sync_data.cc » ('j') | sync/api/sync_data.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698