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

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

Issue 18119005: Misc. cleanup: (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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_controller.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_controller.cc (revision 208964)
+++ 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;
+ }
- // 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.
+ keyword = match->associated_keyword.get() ?
+ match->associated_keyword->keyword :
+ keyword_provider_->GetKeywordForText(match->fill_into_edit);
+ 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();
}
}
}
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698