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

Unified Diff: chrome/browser/chromeos/launcher_search_provider/service.cc

Issue 1140873002: Change queryId of launcherSearchProvider API to integer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove old TODO. Created 5 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/chromeos/launcher_search_provider/service.cc
diff --git a/chrome/browser/chromeos/launcher_search_provider/service.cc b/chrome/browser/chromeos/launcher_search_provider/service.cc
index 8ad4a6e47557176e5b9fd08b357bdcb9d2162154..95ed72bdb8fd85ad4b1cb73a3f8a37d97bf2c531 100644
--- a/chrome/browser/chromeos/launcher_search_provider/service.cc
+++ b/chrome/browser/chromeos/launcher_search_provider/service.cc
@@ -54,13 +54,12 @@ void Service::OnQueryStarted(app_list::LauncherSearchProvider* provider,
for (const ExtensionId extension_id : extension_ids) {
// Convert query_id_ to string here since queryId is defined as string in
// javascript side API while we use uint32 internally to generate it.
- // TODO(yawano): Consider if we can change it to integer at javascript side.
event_router->DispatchEventToExtension(
extension_id,
make_scoped_ptr(new extensions::Event(
api_launcher_search_provider::OnQueryStarted::kEventName,
api_launcher_search_provider::OnQueryStarted::Create(
- std::to_string(query_id_), query, max_result))));
+ query_id_, query, max_result))));
}
}
@@ -77,8 +76,7 @@ void Service::OnQueryEnded() {
extension_id,
make_scoped_ptr(new extensions::Event(
api_launcher_search_provider::OnQueryEnded::kEventName,
- api_launcher_search_provider::OnQueryEnded::Create(
- std::to_string(query_id_)))));
+ api_launcher_search_provider::OnQueryEnded::Create(query_id_))));
}
is_query_running_ = false;
@@ -100,12 +98,12 @@ void Service::OnOpenResult(const ExtensionId& extension_id,
void Service::SetSearchResults(
const extensions::Extension* extension,
scoped_ptr<ErrorReporter> error_reporter,
- const std::string& query_id,
+ const int query_id,
const std::vector<linked_ptr<
extensions::api::launcher_search_provider::SearchResult>>& results) {
// If query is not running or query_id is different from current query id,
// discard the results.
- if (!is_query_running_ || query_id != std::to_string(query_id_))
+ if (!is_query_running_ || query_id != query_id_)
return;
// If |extension| is not in the listener extensions list, ignore it.
« no previous file with comments | « chrome/browser/chromeos/launcher_search_provider/service.h ('k') | chrome/common/extensions/api/launcher_search_provider.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698