summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/autocomplete/autocomplete.cc14
-rw-r--r--chrome/browser/autocomplete/autocomplete.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc
index cf40e76..6c18880 100644
--- a/chrome/browser/autocomplete/autocomplete.cc
+++ b/chrome/browser/autocomplete/autocomplete.cc
@@ -781,15 +781,15 @@ void AutocompleteController::DelayTimerFired() {
}
void AutocompleteController::CommitResult() {
- if (!updated_latest_result_) {
- // Don't send update notifications when nothing's actually changed.
- if (done_) {
- update_delay_timer_.Stop();
- delay_interval_has_passed_ = false;
- }
- return;
+ if (done_) {
+ update_delay_timer_.Stop();
+ delay_interval_has_passed_ = false;
}
+ // Don't send update notifications when nothing's actually changed.
+ if (!updated_latest_result_)
+ return;
+
updated_latest_result_ = false;
delay_interval_has_passed_ = false;
have_committed_during_this_query_ = true;
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);