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

Unified Diff: components/prefs/pref_value_map.h

Issue 1907043002: Convert //components/prefs from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixes 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/prefs/pref_value_map.h
diff --git a/components/prefs/pref_value_map.h b/components/prefs/pref_value_map.h
index 988a63891976904620d5d1238e361a184e5318a0..a3b4aad6d7cd0826fb8925e69d533b2ba20c9ce4 100644
--- a/components/prefs/pref_value_map.h
+++ b/components/prefs/pref_value_map.h
@@ -5,12 +5,12 @@
#ifndef COMPONENTS_PREFS_PREF_VALUE_MAP_H_
#define COMPONENTS_PREFS_PREF_VALUE_MAP_H_
+#include <memory>
#include <string>
#include <vector>
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "components/prefs/base_prefs_export.h"
namespace base {
@@ -20,7 +20,7 @@ class Value;
// A generic string to value map used by the PrefStore implementations.
class COMPONENTS_PREFS_EXPORT PrefValueMap {
public:
- using Map = base::ScopedPtrHashMap<std::string, scoped_ptr<base::Value>>;
+ using Map = base::ScopedPtrHashMap<std::string, std::unique_ptr<base::Value>>;
using iterator = Map::iterator;
using const_iterator = Map::const_iterator;
@@ -35,7 +35,7 @@ class COMPONENTS_PREFS_EXPORT PrefValueMap {
// Sets a new |value| for |key|. |value| must be non-null. Returns true if the
// value changed.
- bool SetValue(const std::string& key, scoped_ptr<base::Value> value);
+ bool SetValue(const std::string& key, std::unique_ptr<base::Value> value);
// Removes the value for |key| from the map. Returns true if a value was
// removed.

Powered by Google App Engine
This is Rietveld 408576698