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

Unified Diff: components/user_prefs/tracked/pref_hash_calculator.cc

Issue 1908143002: Convert //components/user_prefs from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore the rightful glory of <windows.h> 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/user_prefs/tracked/pref_hash_calculator.cc
diff --git a/components/user_prefs/tracked/pref_hash_calculator.cc b/components/user_prefs/tracked/pref_hash_calculator.cc
index 2099121b11d3a30c2053749a8e9604d2e4829a7f..12fb03d8fe82e82e267586fe8724eaf6d1fca739 100644
--- a/components/user_prefs/tracked/pref_hash_calculator.cc
+++ b/components/user_prefs/tracked/pref_hash_calculator.cc
@@ -6,12 +6,12 @@
#include <stdint.h>
+#include <memory>
#include <vector>
#include "base/bind.h"
#include "base/json/json_string_value_serializer.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/values.h"
@@ -51,7 +51,7 @@ std::string ValueAsString(const base::Value* value) {
// Dictionary values may contain empty lists and sub-dictionaries. Make a
// deep copy with those removed to make the hash more stable.
const base::DictionaryValue* dict_value;
- scoped_ptr<base::DictionaryValue> canonical_dict_value;
+ std::unique_ptr<base::DictionaryValue> canonical_dict_value;
if (value && value->GetAsDictionary(&dict_value)) {
canonical_dict_value = dict_value->DeepCopyWithoutEmptyChildren();
value = canonical_dict_value.get();

Powered by Google App Engine
This is Rietveld 408576698