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

Unified Diff: components/prefs/pref_registry_simple.h

Issue 2784513002: Move PrefRegistrySimple to use unique_ptr<Value> (Closed)
Patch Set: Android Created 3 years, 9 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
« no previous file with comments | « components/prefs/pref_registry.cc ('k') | components/prefs/pref_registry_simple.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/pref_registry_simple.h
diff --git a/components/prefs/pref_registry_simple.h b/components/prefs/pref_registry_simple.h
index e326787159031ad3ba7cfca3c320526bd7599d9f..23a0ed4bcd228fe0e855c556c9e24988eb87c621 100644
--- a/components/prefs/pref_registry_simple.h
+++ b/components/prefs/pref_registry_simple.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/macros.h"
@@ -34,9 +35,10 @@ class COMPONENTS_PREFS_EXPORT PrefRegistrySimple : public PrefRegistry {
void RegisterListPref(const std::string& path);
void RegisterDictionaryPref(const std::string& path);
void RegisterListPref(const std::string& path,
- base::ListValue* default_value);
- void RegisterDictionaryPref(const std::string& path,
- base::DictionaryValue* default_value);
+ std::unique_ptr<base::ListValue> default_value);
+ void RegisterDictionaryPref(
+ const std::string& path,
+ std::unique_ptr<base::DictionaryValue> default_value);
void RegisterInt64Pref(const std::string& path, int64_t default_value);
void RegisterUint64Pref(const std::string&, uint64_t default_value);
@@ -60,11 +62,12 @@ class COMPONENTS_PREFS_EXPORT PrefRegistrySimple : public PrefRegistry {
void RegisterListPref(const std::string&, uint32_t flags);
void RegisterDictionaryPref(const std::string&, uint32_t flags);
void RegisterListPref(const std::string&,
- base::ListValue* default_value,
+ std::unique_ptr<base::ListValue> default_value,
uint32_t flags);
- void RegisterDictionaryPref(const std::string&,
- base::DictionaryValue* default_value,
- uint32_t flags);
+ void RegisterDictionaryPref(
+ const std::string&,
+ std::unique_ptr<base::DictionaryValue> default_value,
+ uint32_t flags);
void RegisterInt64Pref(const std::string&,
int64_t default_value,
uint32_t flags);
@@ -82,7 +85,7 @@ class COMPONENTS_PREFS_EXPORT PrefRegistrySimple : public PrefRegistry {
private:
void RegisterPrefAndNotify(const std::string&,
- base::Value* default_value,
+ std::unique_ptr<base::Value> default_value,
uint32_t flags);
DISALLOW_COPY_AND_ASSIGN(PrefRegistrySimple);
« no previous file with comments | « components/prefs/pref_registry.cc ('k') | components/prefs/pref_registry_simple.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698