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 6ba8740707a2043a1534829e5670972b48e02585..cd8b4c6919af4421672f5932f971256f44314af8 100644 |
| --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| @@ -628,7 +628,7 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match, |
| delegate_->CurrentPageExists() ? ClassifyPage(delegate_->GetURL()) : |
| metrics::OmniboxEventProto_PageClassification_OTHER, |
| elapsed_time_since_user_first_modified_omnibox, |
| - string16::npos, // completed_length; possibly set later |
| + match.inline_autocompletion.length(), |
| elapsed_time_since_last_change_to_default_match, |
| result()); |
| @@ -646,12 +646,6 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match, |
| if (index != OmniboxPopupModel::kNoMatch) |
| log.selected_index = index; |
| - if (match.inline_autocomplete_offset != string16::npos) { |
| - DCHECK_GE(match.fill_into_edit.length(), |
| - match.inline_autocomplete_offset); |
| - log.completed_length = |
| - match.fill_into_edit.length() - match.inline_autocomplete_offset; |
| - } |
| if ((disposition == CURRENT_TAB) && delegate_->CurrentPageExists()) { |
| // If we know the destination is being opened in the current tab, |
| @@ -920,7 +914,7 @@ void OmniboxEditModel::OnUpOrDownKeyPressed(int count) { |
| } |
| void OmniboxEditModel::OnPopupDataChanged( |
| - const string16& text, |
| + const string16 text, |
| GURL* destination_for_temporary_text_change, |
| const string16& keyword, |
| bool is_keyword_hint) { |
| @@ -1110,16 +1104,8 @@ void OmniboxEditModel::OnCurrentMatchChanged() { |
| string16 keyword; |
| bool is_keyword_hint; |
| match.GetKeywordUIState(profile_, &keyword, &is_keyword_hint); |
| - string16 inline_autocomplete_text; |
| - if (match.inline_autocomplete_offset < match.fill_into_edit.length()) { |
| - // We have blue text, go through OnPopupDataChanged. |
| - // TODO(beaudoin): Merge OnPopupDataChanged with this method once the |
| - // popup handling has completely migrated to omnibox_controller. |
|
Peter Kasting
2013/07/16 18:09:05
This TODO should perhaps be preserved?
Mark P
2013/07/16 18:53:23
Okay. Done.
|
| - inline_autocomplete_text = |
| - match.fill_into_edit.substr(match.inline_autocomplete_offset); |
| - } |
| popup_model()->OnResultChanged(); |
| - OnPopupDataChanged(inline_autocomplete_text, NULL, keyword, |
| + OnPopupDataChanged(match.inline_autocompletion, NULL, keyword, |
| is_keyword_hint); |
| } |