Chromium Code Reviews| 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( |