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

Unified Diff: chrome/browser/extensions/api/automation_internal/automation_event_router.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
Index: chrome/browser/extensions/api/automation_internal/automation_event_router.cc
diff --git a/chrome/browser/extensions/api/automation_internal/automation_event_router.cc b/chrome/browser/extensions/api/automation_internal/automation_event_router.cc
index a55a4d97c8cb29ff8ab048e8aa5986e74e7c3ef7..9b072fe6f169aa208f1090976c5c41efd7eb77f3 100644
--- a/chrome/browser/extensions/api/automation_internal/automation_event_router.cc
+++ b/chrome/browser/extensions/api/automation_internal/automation_event_router.cc
@@ -116,11 +116,10 @@ void AutomationEventRouter::DispatchTreeDestroyedEvent(
browser_context = browser_context ? browser_context : active_profile_;
std::unique_ptr<base::ListValue> args(
api::automation_internal::OnAccessibilityTreeDestroyed::Create(tree_id));
- std::unique_ptr<Event> event(new Event(
+ auto event = base::MakeUnique<Event>(
events::AUTOMATION_INTERNAL_ON_ACCESSIBILITY_TREE_DESTROYED,
api::automation_internal::OnAccessibilityTreeDestroyed::kEventName,
- std::move(args)));
- event->restrict_to_browser_context = browser_context;
+ std::move(args), browser_context);
EventRouter::Get(browser_context)->BroadcastEvent(std::move(event));
}

Powered by Google App Engine
This is Rietveld 408576698