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

Unified Diff: chrome/browser/extensions/api/omnibox/omnibox_api.cc

Issue 2257113002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/omnibox/omnibox_api.cc
diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.cc b/chrome/browser/extensions/api/omnibox/omnibox_api.cc
index 04ab949662f5d87a105f5f0cbc09c0b1f13eb9e8..449edc5c2d0281f3ec86551a4c36370c547b6c86 100644
--- a/chrome/browser/extensions/api/omnibox/omnibox_api.cc
+++ b/chrome/browser/extensions/api/omnibox/omnibox_api.cc
@@ -105,9 +105,9 @@ std::string GetTemplateURLStringForExtension(const std::string& extension_id) {
// static
void ExtensionOmniboxEventRouter::OnInputStarted(
Profile* profile, const std::string& extension_id) {
- std::unique_ptr<Event> event(new Event(
- events::OMNIBOX_ON_INPUT_STARTED, omnibox::OnInputStarted::kEventName,
- base::WrapUnique(new base::ListValue())));
+ std::unique_ptr<Event> event(new Event(events::OMNIBOX_ON_INPUT_STARTED,
Devlin 2016/08/29 15:10:01 optional: use MakeUnique here?
Adam Rice 2016/08/30 07:03:00 Done.
+ omnibox::OnInputStarted::kEventName,
+ base::MakeUnique<base::ListValue>()));
event->restrict_to_browser_context = profile;
EventRouter::Get(profile)
->DispatchEventToExtension(extension_id, std::move(event));
@@ -175,9 +175,9 @@ void ExtensionOmniboxEventRouter::OnInputEntered(
// static
void ExtensionOmniboxEventRouter::OnInputCancelled(
Profile* profile, const std::string& extension_id) {
- std::unique_ptr<Event> event(new Event(
- events::OMNIBOX_ON_INPUT_CANCELLED, omnibox::OnInputCancelled::kEventName,
- base::WrapUnique(new base::ListValue())));
+ std::unique_ptr<Event> event(new Event(events::OMNIBOX_ON_INPUT_CANCELLED,
Devlin 2016/08/29 15:10:01 ditto
Adam Rice 2016/08/30 07:03:00 Done.
+ omnibox::OnInputCancelled::kEventName,
+ base::MakeUnique<base::ListValue>()));
event->restrict_to_browser_context = profile;
EventRouter::Get(profile)
->DispatchEventToExtension(extension_id, std::move(event));

Powered by Google App Engine
This is Rietveld 408576698