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

Unified Diff: chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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: chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h
diff --git a/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h b/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h
index f1c671462d8735555a317e5f64fac61a31884747..b4e674a1d7a678decb42452f9a9b3675b5aa5581 100644
--- a/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h
+++ b/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <map>
+#include <memory>
#include <set>
#include <string>
#include <utility>
@@ -16,7 +17,6 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/linked_ptr.h"
-#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/api/declarative_content/content_action.h"
#include "chrome/browser/extensions/api/declarative_content/content_condition.h"
#include "chrome/browser/extensions/api/declarative_content/content_predicate_evaluator.h"
@@ -56,7 +56,7 @@ class ChromeContentRulesRegistry
public ContentPredicateEvaluator::Delegate {
public:
using PredicateEvaluatorsFactory =
- base::Callback<std::vector<scoped_ptr<ContentPredicateEvaluator>>(
+ base::Callback<std::vector<std::unique_ptr<ContentPredicateEvaluator>>(
ContentPredicateEvaluator::Delegate*)>;
// For testing, |cache_delegate| can be NULL. In that case it constructs the
@@ -105,14 +105,14 @@ class ChromeContentRulesRegistry
struct ContentRule {
public:
ContentRule(const Extension* extension,
- std::vector<scoped_ptr<const ContentCondition>> conditions,
- std::vector<scoped_ptr<const ContentAction>> actions,
+ std::vector<std::unique_ptr<const ContentCondition>> conditions,
+ std::vector<std::unique_ptr<const ContentAction>> actions,
int priority);
~ContentRule();
const Extension* extension;
- std::vector<scoped_ptr<const ContentCondition>> conditions;
- std::vector<scoped_ptr<const ContentAction>> actions;
+ std::vector<std::unique_ptr<const ContentCondition>> conditions;
+ std::vector<std::unique_ptr<const ContentAction>> actions;
int priority;
private:
@@ -135,7 +135,7 @@ class ChromeContentRulesRegistry
// and ContentAction. |extension| may be NULL in tests. If |error| is empty,
// the translation was successful and the returned rule is internally
// consistent.
- scoped_ptr<const ContentRule> CreateRule(
+ std::unique_ptr<const ContentRule> CreateRule(
const Extension* extension,
const std::map<std::string, ContentPredicateFactory*>&
predicate_factories,
@@ -175,7 +175,7 @@ class ChromeContentRulesRegistry
// The evaluators responsible for creating predicates and tracking
// predicate-related state.
- std::vector<scoped_ptr<ContentPredicateEvaluator>> evaluators_;
+ std::vector<std::unique_ptr<ContentPredicateEvaluator>> evaluators_;
// Specifies what to do with evaluation requests.
EvaluationDisposition evaluation_disposition_;

Powered by Google App Engine
This is Rietveld 408576698