Chromium Code Reviews| Index: chrome/browser/ui/omnibox/omnibox_controller.cc |
| diff --git a/chrome/browser/ui/omnibox/omnibox_controller.cc b/chrome/browser/ui/omnibox/omnibox_controller.cc |
| index fa57f8bfdebc741d685c541ff2467526c299cb35..20f0ab334a1c7ddb3f5c039674f0a55ae65a1bfe 100644 |
| --- a/chrome/browser/ui/omnibox/omnibox_controller.cc |
| +++ b/chrome/browser/ui/omnibox/omnibox_controller.cc |
| @@ -71,14 +71,6 @@ void OmniboxController::StartAutocomplete( |
| InstantController* instant_controller = GetInstantController(); |
| if (instant_controller) { |
|
kmadhusu
2013/06/25 23:30:33
nit: Remove {}.
Jered
2013/06/25 23:33:40
Done.
|
| instant_controller->OnAutocompleteStart(); |
| - // If the embedded page for InstantExtended is fetching its own suggestions, |
| - // suppress search suggestions from SearchProvider. We still need |
| - // SearchProvider to run for FinalizeInstantQuery. |
| - // TODO(dcblack): Once we are done refactoring the omnibox so we don't need |
| - // to use FinalizeInstantQuery anymore, we can take out this check and |
| - // remove this provider from kInstantExtendedOmniboxProviders. |
| - if (instant_controller->WillFetchCompletions()) |
| - autocomplete_controller_->search_provider()->SuppressSearchSuggestions(); |
| } |
| #endif |
| if (chrome::IsInstantExtendedAPIEnabled()) { |
| @@ -184,25 +176,6 @@ bool OmniboxController::DoInstant(const AutocompleteMatch& match, |
| #endif |
| } |
| -void OmniboxController::FinalizeInstantQuery( |
| - const string16& input_text, |
| - const InstantSuggestion& suggestion) { |
| -// Should only get called for the HTML popup. |
| -#if defined(HTML_INSTANT_EXTENDED_POPUP) |
| - if (!popup_model()->result().empty()) { |
| - // We need to finalize the instant query in all cases where the |
| - // |popup_model| holds some result. It is not enough to check whether the |
| - // popup is open, since when an IME is active the popup may be closed while |
| - // |popup_model| contains a non-empty result. |
| - SearchProvider* search_provider = |
| - autocomplete_controller_->search_provider(); |
| - // There may be no providers during testing; guard against that. |
| - if (search_provider) |
| - search_provider->FinalizeInstantQuery(input_text, suggestion); |
| - } |
| -#endif |
| -} |
| - |
| void OmniboxController::SetInstantSuggestion( |
| const InstantSuggestion& suggestion) { |
| // Should only get called for the HTML popup. |
| @@ -210,12 +183,8 @@ void OmniboxController::SetInstantSuggestion( |
| switch (suggestion.behavior) { |
| case INSTANT_COMPLETE_NOW: |
| // Set blue suggestion text. |
| - // TODO(beaudoin): This currently goes to the SearchProvider. Instead we |
| - // should just create a valid current_match_ and call |
| - // omnibox_edit_model_->OnCurrentMatchChanged. This way we can get rid of |
| - // FinalizeInstantQuery entirely. |
| - if (!suggestion.text.empty()) |
| - FinalizeInstantQuery(omnibox_edit_model_->GetViewText(), suggestion); |
| + // TODO(beaudoin): Create a valid current_match_ and call |
| + // omnibox_edit_model_->OnCurrentMatchChanged. |
| return; |
| case INSTANT_COMPLETE_NEVER: { |
| @@ -225,13 +194,6 @@ void OmniboxController::SetInstantSuggestion( |
| // Remove "?" if we're in forced query mode. |
| gray_suggestion_ = suggestion.text; |
| - // TODO(beaudoin): The following should no longer be needed once the |
| - // instant suggestion no longer goes through the search provider. |
| - SearchProvider* search_provider = |
| - autocomplete_controller_->search_provider(); |
| - if (search_provider) |
| - search_provider->ClearInstantSuggestion(); |
| - |
| omnibox_edit_model_->OnGrayTextChanged(); |
| return; |
| } |