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

Unified Diff: components/prefs/pref_service.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_service.h
diff --git a/components/prefs/pref_service.h b/components/prefs/pref_service.h
index 6c95b64f6536eb1e8174bb097bda4b71bfa31099..82de7c4b79ed8852860421d95a94d3d6125999ff 100644
--- a/components/prefs/pref_service.h
+++ b/components/prefs/pref_service.h
@@ -13,6 +13,7 @@
#include <stdint.h>
+#include <memory>
#include <set>
#include <string>
@@ -21,7 +22,6 @@
#include "base/containers/hash_tables.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/threading/non_thread_safe.h"
#include "base/values.h"
@@ -251,11 +251,12 @@ class COMPONENTS_PREFS_EXPORT PrefService : public base::NonThreadSafe {
bool HasPrefPath(const std::string& path) const;
// Returns a dictionary with effective preference values.
- scoped_ptr<base::DictionaryValue> GetPreferenceValues() const;
+ std::unique_ptr<base::DictionaryValue> GetPreferenceValues() const;
// Returns a dictionary with effective preference values, omitting prefs that
// are at their default values.
- scoped_ptr<base::DictionaryValue> GetPreferenceValuesOmitDefaults() const;
+ std::unique_ptr<base::DictionaryValue> GetPreferenceValuesOmitDefaults()
+ const;
// Returns a dictionary with effective preference values. Contrary to
// GetPreferenceValues(), the paths of registered preferences are not split on
@@ -264,8 +265,8 @@ class COMPONENTS_PREFS_EXPORT PrefService : public base::NonThreadSafe {
// For example, if "foo.bar" is a registered preference, the result could look
// like this:
// {"foo.bar": {"a": {"b": true}}}.
- scoped_ptr<base::DictionaryValue> GetPreferenceValuesWithoutPathExpansion()
- const;
+ std::unique_ptr<base::DictionaryValue>
+ GetPreferenceValuesWithoutPathExpansion() const;
bool ReadOnly() const;
@@ -302,11 +303,11 @@ class COMPONENTS_PREFS_EXPORT PrefService : public base::NonThreadSafe {
// The PrefNotifier handles registering and notifying preference observers.
// It is created and owned by this PrefService. Subclasses may access it for
// unit testing.
- scoped_ptr<PrefNotifierImpl> pref_notifier_;
+ std::unique_ptr<PrefNotifierImpl> pref_notifier_;
// The PrefValueStore provides prioritized preference values. It is owned by
// this PrefService. Subclasses may access it for unit testing.
- scoped_ptr<PrefValueStore> pref_value_store_;
+ std::unique_ptr<PrefValueStore> pref_value_store_;
scoped_refptr<PrefRegistry> pref_registry_;

Powered by Google App Engine
This is Rietveld 408576698