From 752a526c83686f1de818d84f929eb16adc57ae8b Mon Sep 17 00:00:00 2001 From: "rlp@chromium.org" Date: Sun, 23 Jun 2013 14:53:42 +0000 Subject: [InstantExtended] Add UserMetricsAction for page load on SRP. Also adds UserMetricsAction for when the Omnibox URL indicates as search. BUG=248790 Review URL: https://chromiumcodereview.appspot.com/16854015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208131 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/omnibox/omnibox_edit_model.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to '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 8ea2426..2c9e8ce 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc @@ -704,6 +704,15 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match, const GURL destination_url = autocomplete_controller()-> GetDestinationURL(match, query_formulation_time); + // 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)) + content::RecordAction(UserMetricsAction( + "OmniboxDestinationURLMatchesDefaultSearchProvider")); + #if defined(HTML_INSTANT_EXTENDED_POPUP) // If running with instant, notify the instant controller that a navigation // is about to take place if we are navigating to a URL. This can be -- cgit v1.1