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..50c317da7af050ad4fac0870e1b621374628e4be 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_NOT_DOING_SEARCH_TERM_REPLACEMENT; |
rpetterson
2013/08/05 19:46:12
Putting AutocompleteInput::SEARCH_RESULT_PAGE_NOT_
Mark P
2013/08/06 19:38:36
Maybe you can break after the colon?
pkasting@ wo
Peter Kasting
2013/08/06 21:32:19
Yeah, break after the colon.
Better, try to come
rpetterson
2013/08/06 23:04:17
Excellent. I've changed the name. Problem avoided,
|
} |
return AutocompleteInput::OTHER; |
} |