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

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

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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 c44382e596ed2e90fc6f835e976ca392ca7e2da2..a2eeb58c125449652f037feb8ce1196853554724 100644
--- a/chrome/browser/extensions/api/omnibox/omnibox_api.cc
+++ b/chrome/browser/extensions/api/omnibox/omnibox_api.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
#include <stddef.h>
+#include <utility>
#include "base/lazy_instance.h"
#include "base/strings/string16.h"
@@ -66,7 +67,7 @@ scoped_ptr<omnibox::SuggestResult> GetOmniboxDefaultSuggestion(
suggestion.reset(new omnibox::SuggestResult);
omnibox::SuggestResult::Populate(*dict, suggestion.get());
}
- return suggestion.Pass();
+ return suggestion;
}
// Tries to set the omnibox default suggestion; returns true on success or
@@ -107,7 +108,7 @@ void ExtensionOmniboxEventRouter::OnInputStarted(
make_scoped_ptr(new base::ListValue())));
event->restrict_to_browser_context = profile;
EventRouter::Get(profile)
- ->DispatchEventToExtension(extension_id, event.Pass());
+ ->DispatchEventToExtension(extension_id, std::move(event));
}
// static
@@ -125,9 +126,9 @@ bool ExtensionOmniboxEventRouter::OnInputChanged(
scoped_ptr<Event> event(new Event(events::OMNIBOX_ON_INPUT_CHANGED,
omnibox::OnInputChanged::kEventName,
- args.Pass()));
+ std::move(args)));
event->restrict_to_browser_context = profile;
- event_router->DispatchEventToExtension(extension_id, event.Pass());
+ event_router->DispatchEventToExtension(extension_id, std::move(event));
return true;
}
@@ -158,10 +159,10 @@ void ExtensionOmniboxEventRouter::OnInputEntered(
scoped_ptr<Event> event(new Event(events::OMNIBOX_ON_INPUT_ENTERED,
omnibox::OnInputEntered::kEventName,
- args.Pass()));
+ std::move(args)));
event->restrict_to_browser_context = profile;
EventRouter::Get(profile)
- ->DispatchEventToExtension(extension_id, event.Pass());
+ ->DispatchEventToExtension(extension_id, std::move(event));
content::NotificationService::current()->Notify(
extensions::NOTIFICATION_EXTENSION_OMNIBOX_INPUT_ENTERED,
@@ -177,7 +178,7 @@ void ExtensionOmniboxEventRouter::OnInputCancelled(
make_scoped_ptr(new base::ListValue())));
event->restrict_to_browser_context = profile;
EventRouter::Get(profile)
- ->DispatchEventToExtension(extension_id, event.Pass());
+ ->DispatchEventToExtension(extension_id, std::move(event));
}
OmniboxAPI::OmniboxAPI(content::BrowserContext* context)

Powered by Google App Engine
This is Rietveld 408576698