| 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..7c3c8d5cdd435438901e04a12dc6777702a9f37b 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) {
|
| @@ -1100,6 +1094,8 @@ bool OmniboxEditModel::OnAfterPossibleChange(const string16& old_text,
|
| MaybeAcceptKeywordBySpace(user_text_));
|
| }
|
|
|
| +// TODO(beaudoin): Merge OnPopupDataChanged with this method once the popup
|
| +// handling has completely migrated to omnibox_controller.
|
| void OmniboxEditModel::OnCurrentMatchChanged() {
|
| has_temporary_text_ = false;
|
|
|
| @@ -1110,16 +1106,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.
|
| - 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);
|
| }
|
|
|
|
|