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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc

Issue 1873263002: Convert //components/data_reduction_proxy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address feedback 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: components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc
index 71af0f3f2958343c547aceb776b882c6dc66e386..f9e43a2d35095d2e5756b78c425fef464d09f548 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc
@@ -4,6 +4,8 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h"
+#include <memory>
+
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_registry_simple.h"
@@ -17,7 +19,8 @@ void TransferPrefList(const char* pref_path,
PrefService* dest) {
DCHECK(src->FindPreference(pref_path)->GetType() == base::Value::TYPE_LIST);
ListPrefUpdate update_dest(dest, pref_path);
- scoped_ptr<base::ListValue> src_list(src->GetList(pref_path)->DeepCopy());
+ std::unique_ptr<base::ListValue> src_list(
+ src->GetList(pref_path)->DeepCopy());
update_dest->Swap(src_list.get());
ListPrefUpdate update_src(src, pref_path);
src->ClearPref(pref_path);

Powered by Google App Engine
This is Rietveld 408576698