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

Unified Diff: extensions/browser/event_router.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/event_listener_map_unittest.cc ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/event_router.h
diff --git a/extensions/browser/event_router.h b/extensions/browser/event_router.h
index e93110d3f7c7f8544faf8bcb02fb2f09097529b1..d84385522b31a1bc5d604a2bbc686044e2f0ed1e 100644
--- a/extensions/browser/event_router.h
+++ b/extensions/browser/event_router.h
@@ -95,7 +95,7 @@ class EventRouter : public KeyedService,
const std::string& extension_id,
events::HistogramValue histogram_value,
const std::string& event_name,
- scoped_ptr<base::ListValue> event_args,
+ std::unique_ptr<base::ListValue> event_args,
UserGestureState user_gesture,
const EventFilteringInfo& info);
@@ -174,18 +174,18 @@ class EventRouter : public KeyedService,
const std::set<std::string>& events);
// Broadcasts an event to every listener registered for that event.
- virtual void BroadcastEvent(scoped_ptr<Event> event);
+ virtual void BroadcastEvent(std::unique_ptr<Event> event);
// Dispatches an event to the given extension.
virtual void DispatchEventToExtension(const std::string& extension_id,
- scoped_ptr<Event> event);
+ std::unique_ptr<Event> event);
// Dispatches |event| to the given extension as if the extension has a lazy
// listener for it. NOTE: This should be used rarely, for dispatching events
// to extensions that haven't had a chance to add their own listeners yet, eg:
// newly installed extensions.
void DispatchEventWithLazyListener(const std::string& extension_id,
- scoped_ptr<Event> event);
+ std::unique_ptr<Event> event);
// Record the Event Ack from the renderer. (One less event in-flight.)
void OnEventAck(content::BrowserContext* context,
@@ -368,7 +368,7 @@ struct Event {
std::string event_name;
// Arguments to send to the event listener.
- scoped_ptr<base::ListValue> event_args;
+ std::unique_ptr<base::ListValue> event_args;
// If non-NULL, then the event will not be sent to other BrowserContexts
// unless the extension has permission (e.g. incognito tab update -> normal
@@ -397,16 +397,16 @@ struct Event {
Event(events::HistogramValue histogram_value,
const std::string& event_name,
- scoped_ptr<base::ListValue> event_args);
+ std::unique_ptr<base::ListValue> event_args);
Event(events::HistogramValue histogram_value,
const std::string& event_name,
- scoped_ptr<base::ListValue> event_args,
+ std::unique_ptr<base::ListValue> event_args,
content::BrowserContext* restrict_to_browser_context);
Event(events::HistogramValue histogram_value,
const std::string& event_name,
- scoped_ptr<base::ListValue> event_args,
+ std::unique_ptr<base::ListValue> event_args,
content::BrowserContext* restrict_to_browser_context,
const GURL& event_url,
EventRouter::UserGestureState user_gesture,
« no previous file with comments | « extensions/browser/event_listener_map_unittest.cc ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698