Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 21395002: [InstantExtended] Fixing how PageLoadSRP is emitted. Previously it was emitted only for Instant sea… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: this time actually fixing merge error correctly Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 b4c9087b4507db3a45152c1547ca85c82fa3f0e9..d4933ee24f032492731cde35fc7c138d9aeb60e0 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -728,12 +728,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);
@@ -1293,6 +1292,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;
}
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_current_page_delegate_impl.cc ('k') | chrome/browser/ui/uma_browsing_activity_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698