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 433e3bb9b88328817fc9286b750773c57b001570..02fe4d42c62c61d7ada43a3a14ddf776e580e587 100644 |
| --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
| @@ -674,8 +674,10 @@ void OmniboxEditModel::AcceptInput(WindowOpenDisposition disposition, |
| if (template_url && template_url->url_ref().HasGoogleBaseURLs()) |
| GoogleURLTracker::GoogleURLSearchCommitted(profile_); |
| - view_->OpenMatch(match, disposition, alternate_nav_url, base::string16(), |
| - OmniboxPopupModel::kNoMatch); |
| + view_->OpenMatch( |
| + match, disposition, alternate_nav_url, base::string16(), |
| + popup_model() ? |
|
Peter Kasting
2014/04/08 23:02:20
Can we really have no popup model here? Maybe in
Mark P
2014/04/08 23:05:01
I didn't actually try skipping this test. Do you
Mark P
2014/04/09 00:16:04
Done. Running it through the try servers now. (I
|
| + popup_model()->selected_line() : OmniboxPopupModel::kNoMatch); |
| } |
| void OmniboxEditModel::OpenMatch(AutocompleteMatch match, |
| @@ -715,11 +717,12 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match, |
| elapsed_time_since_last_change_to_default_match = |
| base::TimeDelta::FromMilliseconds(-1); |
| } |
| + DCHECK_NE(OmniboxPopupModel::kNoMatch, index); |
| OmniboxLog log( |
| input_text, |
| just_deleted_text_, |
| autocomplete_controller()->input().type(), |
| - popup_model()->selected_line(), |
| + index, |
| -1, // don't yet know tab ID; set later if appropriate |
| ClassifyPage(), |
| elapsed_time_since_user_first_modified_omnibox, |
| @@ -739,9 +742,6 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match, |
| << "omnibox text at same time or before the most recent time the " |
| << "default match changed."; |
| - if (index != OmniboxPopupModel::kNoMatch) |
| - log.selected_index = index; |
| - |
| if ((disposition == CURRENT_TAB) && delegate_->CurrentPageExists()) { |
| // If we know the destination is being opened in the current tab, |
| // we can easily get the tab ID. (If it's being opened in a new |