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

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

Issue 10879043: Centralize logic around Instant modes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a few more style nits 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 | chrome/browser/autocomplete/search_provider_unittest.cc » ('j') | 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 c029620aa8c2a024281f72b4a7593a8e7ac25e8b..3795df0e834fca1daa2054176615df105a8ac95b 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -686,7 +686,7 @@ bool SearchProvider::ParseSuggestResults(Value* root_val, bool is_keyword) {
extras->GetList("google:suggesttype", &types);
// Only accept relevance suggestions if Instant is disabled.
- if (!is_keyword && !InstantController::IsEnabled(profile_)) {
+ if (!is_keyword && !InstantController::IsSuggestEnabled(profile_)) {
// Discard this list if its size does not match that of the suggestions.
if (extras->GetList("google:suggestrelevance", &relevances) &&
relevances->GetSize() != results->GetSize())
@@ -1236,5 +1236,6 @@ void SearchProvider::UpdateDone() {
// We're done when the timer isn't running, there are no suggest queries
// pending, and we're not waiting on instant.
done_ = (!timer_.IsRunning() && (suggest_results_pending_ == 0) &&
- (instant_finalized_ || !InstantController::IsEnabled(profile_)));
+ (instant_finalized_ ||
+ !InstantController::IsSuggestEnabled(profile_)));
}
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698