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

Unified Diff: chrome/browser/ui/search/instant_controller.cc

Issue 12792013: Instant extended: Remove suggest commit on lost focus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/search/instant_controller.cc
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 8dcc23badcd2c8ac4034bb6080f57d5ad555c2a2..e02831bd7e542f615c88f55b7af387b4503f9a73 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -1224,20 +1224,6 @@ void InstantController::OmniboxLostFocus(gfx::NativeView view_gaining_focus) {
return;
if (model_.mode().is_default()) {
- // Correct search terms if the user clicked on the committed results page
- // while showing an autocomplete suggestion
- if (UseInstantTabToShowSuggestions() && !last_suggestion_.text.empty() &&
- last_suggestion_.behavior == INSTANT_COMPLETE_NEVER &&
- IsViewInContents(GetViewGainingFocus(view_gaining_focus),
- instant_tab_->contents())) {
- // Commit the omnibox's suggested grey text as if the user had typed it.
- browser_->CommitSuggestedText(true);
-
- // Update the state so that next query from hitting Enter from the
- // omnibox is correct.
- last_omnibox_text_ += last_suggestion_.text;
- last_suggestion_ = InstantSuggestion();
- }
// If the overlay is not showing at all, recreate it if it's stale.
ReloadOverlayIfStale();
MaybeSwitchToRemoteOverlay();
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | chrome/browser/ui/search/instant_extended_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698