| 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();
|
| }
|
| }
|
| }
|
|
|