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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 13141002: Use Instant suggested match type for Instant temporary text. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/search/instant_extended_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index 481c0792b5c6018984c548f1620d04502503547c..bd80c17edb2fc0d950ba13621b6e05e4ce06ba4d 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -549,6 +549,11 @@ void OmniboxEditModel::AcceptInput(WindowOpenDisposition disposition,
GURL alternate_nav_url;
GetInfoForCurrentText(&match, &alternate_nav_url);
+ // If Instant provided the current match, let it decide whether it should be
+ // treated as a navigation or search. http://crbug.com/224522.
+ if (is_temporary_text_set_by_instant_)
+ match.transition = content::PAGE_TRANSITION_GENERATED;
Peter Kasting 2013/03/28 20:35:00 It's not at all clear to me why this fixes the pro
+
// If CTRL is down it means the user wants to append ".com" to the text he
// typed. If we can successfully generate a URL_WHAT_YOU_TYPED match doing
// that, then we use this.
« no previous file with comments | « no previous file | chrome/browser/ui/search/instant_extended_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698