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

Unified Diff: chrome/browser/extensions/api/preference/preference_helpers.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/preference/preference_helpers.cc
diff --git a/chrome/browser/extensions/api/preference/preference_helpers.cc b/chrome/browser/extensions/api/preference/preference_helpers.cc
index 2361270a861fefb22b6664582764d022cafc7b28..5d4c1296ae51c291e6598ce655e7ad8ad7227b80 100644
--- a/chrome/browser/extensions/api/preference/preference_helpers.cc
+++ b/chrome/browser/extensions/api/preference/preference_helpers.cc
@@ -128,9 +128,9 @@ void DispatchEventToExtensions(Profile* profile,
}
std::unique_ptr<base::ListValue> args_copy(args->DeepCopy());
- std::unique_ptr<Event> event(
- new Event(histogram_value, event_name, std::move(args_copy)));
- event->restrict_to_browser_context = restrict_to_profile;
+ auto event =
+ base::MakeUnique<Event>(histogram_value, event_name,
+ std::move(args_copy), restrict_to_profile);
router->DispatchEventToExtension(extension->id(), std::move(event));
}
}

Powered by Google App Engine
This is Rietveld 408576698