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

Unified Diff: components/sync/driver/about_sync_util.cc

Issue 2287733002: Switch //components away from base::ListValue::Append(Value*) overload. (Closed)
Patch Set: rebase Created 4 years, 4 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: components/sync/driver/about_sync_util.cc
diff --git a/components/sync/driver/about_sync_util.cc b/components/sync/driver/about_sync_util.cc
index 88427539432a96800ddfa00a959870e1a4a9d843..808602795e4bf8bb004fdae58f177a4312d870f9 100644
--- a/components/sync/driver/about_sync_util.cc
+++ b/components/sync/driver/about_sync_util.cc
@@ -8,6 +8,7 @@
#include <utility>
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string16.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
@@ -117,7 +118,7 @@ StringSyncStat::StringSyncStat(base::ListValue* section,
stat_->SetString("stat_name", key);
stat_->SetString("stat_value", "Uninitialized");
stat_->SetBoolean("is_valid", false);
- section->Append(stat_);
+ section->Append(base::WrapUnique(stat_));
}
void StringSyncStat::SetValue(const std::string& value) {
@@ -145,7 +146,7 @@ BoolSyncStat::BoolSyncStat(base::ListValue* section, const std::string& key) {
stat_->SetString("stat_name", key);
stat_->SetBoolean("stat_value", false);
stat_->SetBoolean("is_valid", false);
- section->Append(stat_);
+ section->Append(base::WrapUnique(stat_));
}
void BoolSyncStat::SetValue(bool value) {
@@ -168,7 +169,7 @@ IntSyncStat::IntSyncStat(base::ListValue* section, const std::string& key) {
stat_->SetString("stat_name", key);
stat_->SetInteger("stat_value", 0);
stat_->SetBoolean("is_valid", false);
- section->Append(stat_);
+ section->Append(base::WrapUnique(stat_));
}
void IntSyncStat::SetValue(int value) {

Powered by Google App Engine
This is Rietveld 408576698