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

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

Issue 10860068: Fix Omnibox search provider's confusing internal variable semantics (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More minor revisions. Created 8 years, 4 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 | « chrome/browser/autocomplete/search_provider.h ('k') | 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 d5507f67e4206b2731b5a54540fad147c32dca7f..b4826584ccd65c6cb80e7c5a82c0bd0d973b64b0 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -504,12 +504,6 @@ void SearchProvider::StartOrStopSuggestQuery(bool minimal_changes) {
if (input_.matches_requested() != AutocompleteInput::ALL_MATCHES)
return;
- // We'll have at least one pending fetch. Set it to 1 now, but the value is
- // correctly set in Run. As Run isn't invoked immediately we need to set this
- // now, else we won't think we're waiting on results from the server when we
- // really are.
- suggest_results_pending_ = 1;
-
// Kick off a timer that will start the URL fetch if it completes before
// the user types another character. Requests may be delayed to avoid
// flooding the server with requests that are likely to be thrown away later
@@ -1242,8 +1236,8 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
}
void SearchProvider::UpdateDone() {
- // We're done when there are no more suggest queries pending (this is set to 1
- // when the timer is started) and we're not waiting on instant.
- done_ = ((suggest_results_pending_ == 0) &&
+ // 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_)));
}
« no previous file with comments | « chrome/browser/autocomplete/search_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698