Index: chrome/browser/autocomplete/search_provider.cc |
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc |
index 068fcd7f478999cf1830cb0575d3c91e8886fe0e..cf9b2b44d854de6c5013e782f97f4837199f8b6d 100644 |
--- a/chrome/browser/autocomplete/search_provider.cc |
+++ b/chrome/browser/autocomplete/search_provider.cc |
@@ -37,6 +37,7 @@ |
#include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
#include "chrome/browser/search_engines/template_url_service.h" |
#include "chrome/browser/search_engines/template_url_service_factory.h" |
+#include "chrome/browser/ui/search/search.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/common/url_constants.h" |
#include "googleurl/src/url_util.h" |
@@ -273,8 +274,16 @@ void SearchProvider::Start(const AutocompleteInput& input, |
input_ = input; |
- DoHistoryQuery(minimal_changes); |
- StartOrStopSuggestQuery(minimal_changes); |
+ // Don't run the normal provider flow when the Instant Extended API is |
+ // enabled. (When the Extended API is enabled, the embedded page will handle |
+ // all search suggestions itself.) |
+ // 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 (!chrome::search::IsInstantExtendedAPIEnabled(profile_)) { |
+ DoHistoryQuery(minimal_changes); |
+ StartOrStopSuggestQuery(minimal_changes); |
+ } |
ConvertResultsToAutocompleteMatches(); |
} |