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

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

Issue 10957005: Disable most of search provider for Instant Extended (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add owner to TODO Created 8 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698