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

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

Issue 11421079: Persist the Instant API to committed search result pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/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 02eb0f1102c50386d8ad588f590a9878967eb2f1..06cc09fd19c1b10cc282938b11866bafdff8be29 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -1189,17 +1189,9 @@ bool OmniboxEditModel::DoInstant(const AutocompleteMatch& match) {
// The two pieces of text we want to send Instant, viz., what the user has
// typed, and the full omnibox text including any inline autocompletion.
- string16 user_text = user_text_;
- string16 full_text = user_text_ + inline_autocomplete_text_;
-
- // If there's temporary text, that overrides the user_text. In this case, we
- // should ignore any inline_autocomplete_text_, because it won't be visible.
- if (has_temporary_text_)
- user_text = full_text = CurrentMatch().fill_into_edit;
-
- // Remove keyword if we're in keyword mode.
- user_text = DisplayTextFromUserText(user_text);
- full_text = DisplayTextFromUserText(full_text);
+ string16 user_text = has_temporary_text_ ?
+ match.fill_into_edit : DisplayTextFromUserText(user_text_);
+ string16 full_text = view_->GetText();
Jered 2012/11/27 18:19:53 I am mildly terrified by GetText(). It's platform
sreeram 2012/11/29 07:33:19 Yeah. user_text_ (and things derived from it, such
// Remove "?" if we're in forced query mode.
AutocompleteInput::RemoveForcedQueryStringIfNecessary(

Powered by Google App Engine
This is Rietveld 408576698