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 3455f08531d7a97ea5538d20a11a942d9b60db15..8176cbf50464fc307450ea6156a1fd4dee71869e 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
@@ -718,12 +718,11 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match, |
// Track whether the destination URL sends us to a search results page |
// using the default search provider. |
- TemplateURL* default_provider = |
- TemplateURLServiceFactory::GetForProfile(profile_)-> |
- GetDefaultSearchProvider(); |
- if (default_provider && default_provider->IsSearchURL(destination_url)) |
+ if (TemplateURLServiceFactory::GetForProfile(profile_)-> |
+ IsSearchResultsPageFromDefaultSearchProvider(destination_url)) { |
content::RecordAction( |
UserMetricsAction("OmniboxDestinationURLIsSearchOnDSP")); |
+ } |
// This calls RevertAll again. |
base::AutoReset<bool> tmp(&in_revert_, true); |
@@ -1268,6 +1267,9 @@ AutocompleteInput::PageClassification OmniboxEditModel::ClassifyPage() const { |
return AutocompleteInput::HOMEPAGE; |
if (view_->toolbar_model()->WouldReplaceSearchURLWithSearchTerms(true)) { |
return AutocompleteInput::SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT; |
+ } |
+ if (delegate_->IsSearchResultsPage()) { |
+ return AutocompleteInput::SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT; |
} |
return AutocompleteInput::OTHER; |
} |