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

Unified Diff: chrome/browser/autocomplete/autocomplete_controller.cc

Issue 17022004: Replace --google-base-suggest-url and --instant-url with --google-base-url. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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/autocomplete/autocomplete_controller.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_controller.cc (revision 208572)
+++ chrome/browser/autocomplete/autocomplete_controller.cc (working copy)
@@ -464,23 +464,23 @@
string16 keyword(match->GetSubstitutingExplicitlyInvokedKeyword(profile_));
if (!keyword.empty()) {
keywords.insert(keyword);
- } else {
- string16 keyword = match->associated_keyword.get() ?
- match->associated_keyword->keyword :
- keyword_provider_->GetKeywordForText(match->fill_into_edit);
+ continue;
+ }
+ keyword = match->associated_keyword.get() ?
+ match->associated_keyword->keyword :
+ keyword_provider_->GetKeywordForText(match->fill_into_edit);
- // Only add the keyword if the match does not have a duplicate keyword
- // with a more relevant match.
- if (!keyword.empty() && !keywords.count(keyword)) {
- keywords.insert(keyword);
+ // Only add the keyword if the match does not have a duplicate keyword
+ // with a more relevant match.
+ if (!keyword.empty() && !keywords.count(keyword)) {
+ keywords.insert(keyword);
- if (!match->associated_keyword.get())
- match->associated_keyword.reset(new AutocompleteMatch(
- keyword_provider_->CreateAutocompleteMatch(match->fill_into_edit,
- keyword, input_)));
- } else {
- match->associated_keyword.reset();
- }
+ if (!match->associated_keyword.get())
+ match->associated_keyword.reset(new AutocompleteMatch(
+ keyword_provider_->CreateAutocompleteMatch(match->fill_into_edit,
+ keyword, input_)));
+ } else {
+ match->associated_keyword.reset();
}
}
}

Powered by Google App Engine
This is Rietveld 408576698