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

Unified Diff: extensions/browser/api/idle/idle_manager.cc

Issue 2898383002: [Extensions] Make Event::restrict_to_browser_context const. (Closed)
Patch Set: sync @tott Created 3 years, 7 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/api/app_runtime/app_runtime_api.cc ('k') | extensions/browser/event_router.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/idle/idle_manager.cc
diff --git a/extensions/browser/api/idle/idle_manager.cc b/extensions/browser/api/idle/idle_manager.cc
index 8f4621bb3f96b897e55b685f0764b0e70f970b14..0fb5346b21cdd77bcbd8a717d4b25d22b5efe807 100644
--- a/extensions/browser/api/idle/idle_manager.cc
+++ b/extensions/browser/api/idle/idle_manager.cc
@@ -50,10 +50,9 @@ void DefaultEventDelegate::OnStateChanged(const std::string& extension_id,
ui::IdleState new_state) {
std::unique_ptr<base::ListValue> args(new base::ListValue());
args->Append(IdleManager::CreateIdleValue(new_state));
- std::unique_ptr<Event> event(new Event(events::IDLE_ON_STATE_CHANGED,
- idle::OnStateChanged::kEventName,
- std::move(args)));
- event->restrict_to_browser_context = context_;
+ auto event = base::MakeUnique<Event>(events::IDLE_ON_STATE_CHANGED,
+ idle::OnStateChanged::kEventName,
+ std::move(args), context_);
EventRouter::Get(context_)
->DispatchEventToExtension(extension_id, std::move(event));
}
« no previous file with comments | « extensions/browser/api/app_runtime/app_runtime_api.cc ('k') | extensions/browser/event_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698