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

Unified Diff: components/policy/core/browser/url_blacklist_manager.h

Issue 1902633006: Convert //components/policy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/policy/core/browser/url_blacklist_manager.h
diff --git a/components/policy/core/browser/url_blacklist_manager.h b/components/policy/core/browser/url_blacklist_manager.h
index 2f081ec9271ee0ce5dfc8488e619615616ff0655..db1763304ac07141b4ec12de41b81444d095da4f 100644
--- a/components/policy/core/browser/url_blacklist_manager.h
+++ b/components/policy/core/browser/url_blacklist_manager.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <map>
+#include <memory>
#include <string>
#include "base/callback_forward.h"
@@ -16,7 +17,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/memory/weak_ptr.h"
#include "components/policy/policy_export.h"
#include "components/prefs/pref_change_registrar.h"
@@ -110,7 +110,7 @@ class POLICY_EXPORT URLBlacklist {
SegmentURLCallback segment_url_;
url_matcher::URLMatcherConditionSet::ID id_;
std::map<url_matcher::URLMatcherConditionSet::ID, FilterComponents> filters_;
- scoped_ptr<url_matcher::URLMatcher> url_matcher_;
+ std::unique_ptr<url_matcher::URLMatcher> url_matcher_;
DISALLOW_COPY_AND_ASSIGN(URLBlacklist);
};
@@ -174,7 +174,7 @@ class POLICY_EXPORT URLBlacklistManager {
// Replaces the current blacklist. Must be called on the IO thread.
// Virtual for testing.
- virtual void SetBlacklist(scoped_ptr<URLBlacklist> blacklist);
+ virtual void SetBlacklist(std::unique_ptr<URLBlacklist> blacklist);
// Registers the preferences related to blacklisting in the given PrefService.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -190,8 +190,8 @@ class POLICY_EXPORT URLBlacklistManager {
// Starts the blacklist update on the IO thread, using the filters in
// |block| and |allow|. Protected for testing.
- void UpdateOnIO(scoped_ptr<base::ListValue> block,
- scoped_ptr<base::ListValue> allow);
+ void UpdateOnIO(std::unique_ptr<base::ListValue> block,
+ std::unique_ptr<base::ListValue> allow);
private:
// ---------
@@ -222,7 +222,7 @@ class POLICY_EXPORT URLBlacklistManager {
scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
// The current blacklist.
- scoped_ptr<URLBlacklist> blacklist_;
+ std::unique_ptr<URLBlacklist> blacklist_;
// Used to post update tasks to the UI thread.
base::WeakPtrFactory<URLBlacklistManager> ui_weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698