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

Unified Diff: trunk/src/chrome/browser/autocomplete/base_search_provider.cc

Issue 477293002: Revert 290058 "Omnibox: Prevent Asynchronous Suggestions from Ch..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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
« no previous file with comments | « no previous file | trunk/src/chrome/browser/autocomplete/search_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/browser/autocomplete/base_search_provider.cc
===================================================================
--- trunk/src/chrome/browser/autocomplete/base_search_provider.cc (revision 290069)
+++ trunk/src/chrome/browser/autocomplete/base_search_provider.cc (working copy)
@@ -116,17 +116,14 @@
bool from_keyword_provider,
const TemplateURL* template_url,
const SearchTermsData& search_terms_data) {
- // These calls use a number of default values. For instance, they assume
- // that if this match is from a keyword provider, then the user is in keyword
- // mode. They also assume the caller knows what it's doing and we set
- // this match to look as if it was received/created synchronously.
- SearchSuggestionParser::SuggestResult suggest_result(
- suggestion, type, suggestion, base::string16(), base::string16(),
- base::string16(), base::string16(), std::string(), std::string(),
- from_keyword_provider, 0, false, false, base::string16());
- suggest_result.set_received_after_last_keystroke(false);
+ // This call uses a number of default values. For instance, it assumes that
+ // if this match is from a keyword provider than the user is in keyword mode.
return CreateSearchSuggestion(
- NULL, AutocompleteInput(), from_keyword_provider, suggest_result,
+ NULL, AutocompleteInput(), from_keyword_provider,
+ SearchSuggestionParser::SuggestResult(
+ suggestion, type, suggestion, base::string16(), base::string16(),
+ base::string16(), base::string16(), std::string(), std::string(),
+ from_keyword_provider, 0, false, false, base::string16()),
template_url, search_terms_data, 0, false);
}
@@ -258,10 +255,7 @@
match.fill_into_edit.assign(base::ASCIIToUTF16("?"));
if (suggestion.from_keyword_provider())
match.fill_into_edit.append(match.keyword + base::char16(' '));
- // We only allow inlinable navsuggestions that were received before the
- // last keystroke because we don't want asynchronous inline autocompletions.
if (!input.prevent_inline_autocomplete() &&
- !suggestion.received_after_last_keystroke() &&
(!in_keyword_mode || suggestion.from_keyword_provider()) &&
StartsWith(suggestion.suggestion(), input.text(), false)) {
match.inline_autocompletion =
« no previous file with comments | « no previous file | trunk/src/chrome/browser/autocomplete/search_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698