From 693e2fe68896b4f9dd5cf32bc44e767eb1353274 Mon Sep 17 00:00:00 2001
From: "pkasting@chromium.org"
 <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Mon, 31 Aug 2009 19:23:33 +0000
Subject: Make AutocompleteController::done() match up with when results are
 actually pushed to listeners.  r24290 made it possible for the controller to
 be "done" (in that all providers had finished) but have not yet sent the
 final results to listeners.  This makes done() only return true when the
 controller has actually pushed the final results.

I'm not sure precisely what effects this discrepancy could have had but I suspect they were bad, given that callers assume done() means "results are stable".

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/173631

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24914 0039d316-1c4b-4281-b951-d872f2087c98
---
 chrome/browser/autocomplete/autocomplete.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'chrome/browser/autocomplete/autocomplete.h')

diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h
index b3ed20b..6002596 100644
--- a/chrome/browser/autocomplete/autocomplete.h
+++ b/chrome/browser/autocomplete/autocomplete.h
@@ -763,7 +763,7 @@ class AutocompleteController : public ACProviderListener {
   // This next is temporary and should go away when
   // AutocompletePopup::URLsForCurrentSelection() moves to the controller.
   const AutocompleteResult& latest_result() const { return latest_result_; }
-  const bool done() const { return done_; }
+  const bool done() const { return done_ && !update_delay_timer_.IsRunning(); }
 
   // From AutocompleteProvider::Listener
   virtual void OnProviderUpdate(bool updated_matches);
-- 
cgit v1.1