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

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: remove unnecessary include 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 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;
}

Powered by Google App Engine
This is Rietveld 408576698