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

Unified Diff: components/omnibox/browser/omnibox_edit_model.cc

Issue 2435103002: Omnibox: Preserve display text and select all on a focus search (Closed)
Patch Set: Add browser tests Created 4 years, 2 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 | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/omnibox_edit_model.cc
diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc
index a20b4a8f0791917444cee9256fb95c18f77f2344..05ad3d2088b8ad41262efcb4facd8410fb11a3d7 100644
--- a/components/omnibox/browser/omnibox_edit_model.cc
+++ b/components/omnibox/browser/omnibox_edit_model.cc
@@ -560,6 +560,7 @@ void OmniboxEditModel::EnterKeywordModeForDefaultSearchProvider(
KeywordModeEntryMethod entry_method) {
autocomplete_controller()->Stop(false);
+ user_text_ = user_input_in_progress_ ? view_->GetText() : base::string16();
user_input_in_progress_ = true;
Tom (Use chromium acct) 2016/10/20 20:34:54 Should this be SetInputInProgress(true)?
Peter Kasting 2016/10/20 21:42:00 Yes, I think so. You should consider using SetUse
keyword_ = client_->GetTemplateURLService()->
GetDefaultSearchProvider()->keyword();
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698