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

Unified Diff: components/user_prefs/tracked/pref_hash_filter.h

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_filter.h
diff --git a/components/user_prefs/tracked/pref_hash_filter.h b/components/user_prefs/tracked/pref_hash_filter.h
index 109f4ceafc5d485857e315ea76fc91389f20f804..8652a7f817c545a5b48e1154c60af1427eadbbbb 100644
--- a/components/user_prefs/tracked/pref_hash_filter.h
+++ b/components/user_prefs/tracked/pref_hash_filter.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <map>
+#include <memory>
#include <set>
#include <vector>
@@ -15,7 +16,6 @@
#include "base/compiler_specific.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "components/user_prefs/tracked/interceptable_pref_filter.h"
#include "components/user_prefs/tracked/tracked_preference.h"
@@ -74,7 +74,7 @@ class PrefHashFilter : public InterceptablePrefFilter {
// the state of the super MAC will be reported via UMA during
// FinalizeFilterOnLoad.
PrefHashFilter(
- scoped_ptr<PrefHashStore> pref_hash_store,
+ std::unique_ptr<PrefHashStore> pref_hash_store,
const std::vector<TrackedPreferenceMetadata>& tracked_preferences,
const base::Closure& on_reset_on_load,
TrackedPreferenceValidationDelegate* delegate,
@@ -107,7 +107,7 @@ class PrefHashFilter : public InterceptablePrefFilter {
// InterceptablePrefFilter implementation.
void FinalizeFilterOnLoad(
const PostFilterOnLoadCallback& post_filter_on_load_callback,
- scoped_ptr<base::DictionaryValue> pref_store_contents,
+ std::unique_ptr<base::DictionaryValue> pref_store_contents,
bool prefs_altered) override;
// Callback to be invoked only once (and subsequently reset) on the next
@@ -117,13 +117,14 @@ class PrefHashFilter : public InterceptablePrefFilter {
// A map of paths to TrackedPreferences; this map owns this individual
// TrackedPreference objects.
- typedef base::ScopedPtrHashMap<std::string, scoped_ptr<TrackedPreference>>
+ typedef base::ScopedPtrHashMap<std::string,
+ std::unique_ptr<TrackedPreference>>
TrackedPreferencesMap;
// A map from changed paths to their corresponding TrackedPreferences (which
// aren't owned by this map).
typedef std::map<std::string, const TrackedPreference*> ChangedPathsMap;
- scoped_ptr<PrefHashStore> pref_hash_store_;
+ std::unique_ptr<PrefHashStore> pref_hash_store_;
// Invoked if a reset occurs in a call to FilterOnLoad.
const base::Closure on_reset_on_load_;
« no previous file with comments | « components/user_prefs/tracked/pref_hash_calculator_unittest.cc ('k') | components/user_prefs/tracked/pref_hash_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698