diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-09-03 13:32:17 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-10-01 14:31:55 +0200 |
commit | 21ba0c5d4bf8fba15dddd97cd693bad2358b77fd (patch) | |
tree | 91be119f694044dfc1ff9fdc054459e925de9df0 /chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc | |
parent | 03c549e0392f92c02536d3f86d5e1d8dfa3435ac (diff) |
BASELINE: Update Chromium to 92.0.4515.166
Change-Id: I42a050486714e9e54fc271f2a8939223a02ae364
Diffstat (limited to 'chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc')
-rw-r--r-- | chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc b/chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc index 3ccf5ea1204..35db70050c1 100644 --- a/chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc +++ b/chromium/chrome/browser/extensions/api/omnibox/omnibox_api.cc @@ -9,6 +9,7 @@ #include <memory> #include <string> #include <utility> +#include <vector> #include "base/bind.h" #include "base/lazy_instance.h" @@ -75,9 +76,7 @@ bool SetOmniboxDefaultSuggestion( std::unique_ptr<base::DictionaryValue> dict = suggestion.ToValue(); // Add the content field so that the dictionary can be used to populate an // omnibox::SuggestResult. - dict->SetWithoutPathExpansion( - kSuggestionContent, - std::make_unique<base::Value>(base::Value::Type::STRING)); + dict->SetKey(kSuggestionContent, base::Value(base::Value::Type::STRING)); prefs->UpdateExtensionPref(extension_id, kOmniboxDefaultSuggestion, std::move(dict)); @@ -96,9 +95,9 @@ std::string GetTemplateURLStringForExtension(const std::string& extension_id) { // static void ExtensionOmniboxEventRouter::OnInputStarted( Profile* profile, const std::string& extension_id) { - auto event = std::make_unique<Event>( - events::OMNIBOX_ON_INPUT_STARTED, omnibox::OnInputStarted::kEventName, - std::make_unique<base::ListValue>(), profile); + auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_STARTED, + omnibox::OnInputStarted::kEventName, + std::vector<base::Value>(), profile); EventRouter::Get(profile) ->DispatchEventToExtension(extension_id, std::move(event)); } @@ -118,7 +117,7 @@ bool ExtensionOmniboxEventRouter::OnInputChanged( auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_CHANGED, omnibox::OnInputChanged::kEventName, - std::move(args), profile); + args->TakeList(), profile); event_router->DispatchEventToExtension(extension_id, std::move(event)); return true; } @@ -150,7 +149,7 @@ void ExtensionOmniboxEventRouter::OnInputEntered( auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_ENTERED, omnibox::OnInputEntered::kEventName, - std::move(args), profile); + args->TakeList(), profile); EventRouter::Get(profile) ->DispatchEventToExtension(extension_id, std::move(event)); @@ -163,9 +162,9 @@ void ExtensionOmniboxEventRouter::OnInputEntered( // static void ExtensionOmniboxEventRouter::OnInputCancelled( Profile* profile, const std::string& extension_id) { - auto event = std::make_unique<Event>( - events::OMNIBOX_ON_INPUT_CANCELLED, omnibox::OnInputCancelled::kEventName, - std::make_unique<base::ListValue>(), profile); + auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_CANCELLED, + omnibox::OnInputCancelled::kEventName, + std::vector<base::Value>(), profile); EventRouter::Get(profile) ->DispatchEventToExtension(extension_id, std::move(event)); } @@ -179,7 +178,7 @@ void ExtensionOmniboxEventRouter::OnDeleteSuggestion( auto event = std::make_unique<Event>(events::OMNIBOX_ON_DELETE_SUGGESTION, omnibox::OnDeleteSuggestion::kEventName, - std::move(args), profile); + args->TakeList(), profile); EventRouter::Get(profile)->DispatchEventToExtension(extension_id, std::move(event)); |