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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 2763063002: [omnibox] Narrow condition for resetting selection (Closed)
Patch Set: Restored include file Created 3 years, 9 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
Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 6fc3b895ef0ba5c89f7e333c373d373a25bd902d..4e47105c51142f7e2b7e0698d39dd314b47c72f6 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -772,12 +772,13 @@ void OmniboxViewViews::OnBlur() {
views::Textfield::OnBlur();
model()->OnWillKillFocus();
- // If ZeroSuggest is active, we may have refused to show an update to the
- // underlying permanent URL that happened while the popup was open, so
- // revert to ensure that update is shown now. Otherwise, make sure to call
- // CloseOmniboxPopup() unconditionally, so that if ZeroSuggest is in the midst
- // of running but hasn't yet opened the popup, it will be halted.
- if (!model()->user_input_in_progress() && model()->popup_model()->IsOpen())
+ // If ZeroSuggest is active, and there is evidence that there is a text
+ // update to show, revert to ensure that update is shown now. Otherwise,
+ // make sure to call CloseOmniboxPopup() unconditionally, so that if
+ // ZeroSuggest is in the midst of running but hasn't yet opened the popup,
+ // it will be halted.
+ if (!model()->user_input_in_progress() && model()->popup_model()->IsOpen() &&
+ model()->text_update_in_progress())
RevertAll();
else
CloseOmniboxPopup();
« no previous file with comments | « no previous file | components/omnibox/browser/omnibox_edit_model.h » ('j') | components/omnibox/browser/omnibox_edit_model.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698