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

Unified Diff: extensions/browser/event_listener_map.h

Issue 1909773002: Convert //extensions/browser 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
« no previous file with comments | « extensions/browser/error_map_unittest.cc ('k') | extensions/browser/event_listener_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/event_listener_map.h
diff --git a/extensions/browser/event_listener_map.h b/extensions/browser/event_listener_map.h
index 0ce5f3c3ac54a7223b1d134cd99cb2ff3ec204d9..fe1568edc02dd64ce942baa63e4cc99c9eabf1d3 100644
--- a/extensions/browser/event_listener_map.h
+++ b/extensions/browser/event_listener_map.h
@@ -6,12 +6,12 @@
#define EXTENSIONS_BROWSER_EVENT_LISTENER_MAP_H_
#include <map>
+#include <memory>
#include <set>
#include <string>
#include <vector>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "extensions/common/event_filter.h"
#include "url/gurl.h"
@@ -50,22 +50,22 @@ class EventListener {
// url: [{hostSuffix: 'google.com'}],
// tabId: 5
// }
- static scoped_ptr<EventListener> ForExtension(
+ static std::unique_ptr<EventListener> ForExtension(
const std::string& event_name,
const std::string& extension_id,
content::RenderProcessHost* process,
- scoped_ptr<base::DictionaryValue> filter);
- static scoped_ptr<EventListener> ForURL(
+ std::unique_ptr<base::DictionaryValue> filter);
+ static std::unique_ptr<EventListener> ForURL(
const std::string& event_name,
const GURL& listener_url,
content::RenderProcessHost* process,
- scoped_ptr<base::DictionaryValue> filter);
+ std::unique_ptr<base::DictionaryValue> filter);
~EventListener();
bool Equals(const EventListener* other) const;
- scoped_ptr<EventListener> Copy() const;
+ std::unique_ptr<EventListener> Copy() const;
// Returns true in the case of a lazy background page, and thus no process.
bool IsLazy() const;
@@ -90,13 +90,13 @@ class EventListener {
const std::string& extension_id,
const GURL& listener_url,
content::RenderProcessHost* process,
- scoped_ptr<base::DictionaryValue> filter);
+ std::unique_ptr<base::DictionaryValue> filter);
const std::string event_name_;
const std::string extension_id_;
const GURL listener_url_;
content::RenderProcessHost* process_;
- scoped_ptr<base::DictionaryValue> filter_;
+ std::unique_ptr<base::DictionaryValue> filter_;
EventFilter::MatcherID matcher_id_; // -1 if unset.
DISALLOW_COPY_AND_ASSIGN(EventListener);
@@ -123,7 +123,7 @@ class EventListenerMap {
// extensions::Event.
// Returns true if the listener was added (in the case that it has never been
// seen before).
- bool AddListener(scoped_ptr<EventListener> listener);
+ bool AddListener(std::unique_ptr<EventListener> listener);
// Remove a listener that .Equals() |listener|.
// Returns true if the listener was removed .
@@ -178,7 +178,7 @@ class EventListenerMap {
void CleanupListener(EventListener* listener);
bool IsFilteredEvent(const Event& event) const;
- scoped_ptr<EventMatcher> ParseEventMatcher(
+ std::unique_ptr<EventMatcher> ParseEventMatcher(
base::DictionaryValue* filter_dict);
// Listens for removals from this map.
« no previous file with comments | « extensions/browser/error_map_unittest.cc ('k') | extensions/browser/event_listener_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698