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

Unified Diff: components/omnibox/browser/history_url_provider.cc

Issue 2409083003: Remove MessageLoop::current() from history_url_provider.cc (Closed)
Patch Set: self-review Created 4 years, 2 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: components/omnibox/browser/history_url_provider.cc
diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc
index 7adb668b51da2d10b065fa35f804e2acf78d8ff8..9ae89e7149527b0a1c6c1b05635fd82038e5dc52 100644
--- a/components/omnibox/browser/history_url_provider.cc
+++ b/components/omnibox/browser/history_url_provider.cc
@@ -426,18 +426,18 @@ HistoryURLProviderParams::HistoryURLProviderParams(
const AutocompleteMatch& what_you_typed_match,
TemplateURL* default_search_provider,
const SearchTermsData& search_terms_data)
- : message_loop(base::MessageLoop::current()),
- input(input),
+ : input(input),
prevent_inline_autocomplete(input.prevent_inline_autocomplete()),
trim_http(trim_http),
what_you_typed_match(what_you_typed_match),
failed(false),
exact_suggestion_is_in_history(false),
promote_type(NEITHER),
- default_search_provider(default_search_provider ?
- new TemplateURL(default_search_provider->data()) : nullptr),
- search_terms_data(new SearchTermsDataSnapshot(search_terms_data)) {
-}
+ default_search_provider(
+ default_search_provider
+ ? new TemplateURL(default_search_provider->data())
+ : nullptr),
+ search_terms_data(new SearchTermsDataSnapshot(search_terms_data)) {}
HistoryURLProviderParams::~HistoryURLProviderParams() {
}
@@ -640,8 +640,8 @@ void HistoryURLProvider::ExecuteWithDB(HistoryURLProviderParams* params,
base::TimeTicks::Now() - beginning_time);
}
- // Return the results (if any) to the main thread.
- params->message_loop->task_runner()->PostTask(
+ // Return the results (if any) to the originating sequence.
+ params->origin_task_runner->PostTask(
FROM_HERE, base::Bind(&HistoryURLProvider::QueryComplete, this, params));
}

Powered by Google App Engine
This is Rietveld 408576698