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

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

Issue 2179063003: Switching out of keyword mode shouldn't count as a minimal change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/autocomplete_controller.cc
diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc
index e0df5736698e3b83888f55f932b9a5d6891e1a2f..6000fcd2a60b1897af2949ba5960200a4eb808cf 100644
--- a/components/omnibox/browser/autocomplete_controller.cc
+++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -237,6 +237,7 @@ void AutocompleteController::Start(const AutocompleteInput& input) {
TRACE_EVENT1("omnibox", "AutocompleteController::Start",
"text", base::UTF16ToUTF8(input.text()));
const base::string16 old_input_text(input_.text());
+ const bool old_allow_exact_keyword_match = input_.allow_exact_keyword_match();
const bool old_want_asynchronous_matches = input_.want_asynchronous_matches();
const bool old_from_omnibox_focus = input_.from_omnibox_focus();
input_ = input;
@@ -252,6 +253,7 @@ void AutocompleteController::Start(const AutocompleteInput& input) {
// can change the text string (e.g. by stripping off a leading '?').
const bool minimal_changes =
(input_.text() == old_input_text) &&
+ (input_.allow_exact_keyword_match() == old_allow_exact_keyword_match) &&
(input_.want_asynchronous_matches() == old_want_asynchronous_matches) &&
(input.from_omnibox_focus() == old_from_omnibox_focus);
@@ -481,8 +483,8 @@ void AutocompleteController::UpdateAssociatedKeywords(
return;
// Determine if the user's input is an exact keyword match.
- base::string16 exact_keyword = keyword_provider_->GetKeywordForText(
- TemplateURLService::CleanUserInputKeyword(input_.text()));
+ base::string16 exact_keyword =
+ keyword_provider_->GetKeywordForText(input_.text());
std::set<base::string16> keywords;
for (ACMatches::iterator match(result->begin()); match != result->end();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698