Chromium Code Reviews| Index: chrome/browser/instant/instant_controller.cc |
| =================================================================== |
| --- chrome/browser/instant/instant_controller.cc (revision 81359) |
| +++ chrome/browser/instant/instant_controller.cc (working copy) |
| @@ -637,7 +637,8 @@ |
| return false; |
| // Extension keywords don't have a real destionation URL. |
|
Peter Kasting
2011/04/13 21:06:59
Nit: While here, destionation -> destination
|
| - if (match.template_url && match.template_url->IsExtensionKeyword()) |
| + if (match.keyword_state == AutocompleteMatch::KEYWORD && |
|
Peter Kasting
2011/04/13 21:06:59
I don't think we need to check the keyword state h
|
| + match.keyword_url && match.keyword_url->IsExtensionKeyword()) |
| return false; |
| // Was the host blacklisted? |
| @@ -674,7 +675,9 @@ |
| const TemplateURL* InstantController::GetTemplateURL( |
| const AutocompleteMatch& match) { |
| - const TemplateURL* template_url = match.template_url; |
| + const TemplateURL* template_url = |
| + match.keyword_state == AutocompleteMatch::KEYWORD ? match.keyword_url : |
|
Peter Kasting
2011/04/13 21:06:59
I think you also want to allow DUAL_SHOWING_KEYWOR
|
| + NULL; |
| if (match.type == AutocompleteMatch::SEARCH_WHAT_YOU_TYPED || |
| match.type == AutocompleteMatch::SEARCH_HISTORY || |
| match.type == AutocompleteMatch::SEARCH_SUGGEST) { |