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

Unified Diff: chrome/browser/extensions/api/history/history_api.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/history/history_api.cc
diff --git a/chrome/browser/extensions/api/history/history_api.cc b/chrome/browser/extensions/api/history/history_api.cc
index a10c6f69f64c2906fda29a4a84f7b1d5ad120c60..b5e49a22470cb2a1d82277d3751269a0d0f433e9 100644
--- a/chrome/browser/extensions/api/history/history_api.cc
+++ b/chrome/browser/extensions/api/history/history_api.cc
@@ -173,9 +173,8 @@ void HistoryEventRouter::DispatchEvent(
const std::string& event_name,
std::unique_ptr<base::ListValue> event_args) {
if (profile && EventRouter::Get(profile)) {
- std::unique_ptr<Event> event(
- new Event(histogram_value, event_name, std::move(event_args)));
- event->restrict_to_browser_context = profile;
+ auto event = base::MakeUnique<Event>(histogram_value, event_name,
+ std::move(event_args), profile);
EventRouter::Get(profile)->BroadcastEvent(std::move(event));
}
}

Powered by Google App Engine
This is Rietveld 408576698