diff options
author | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-11 17:17:13 +0000 |
---|---|---|
committer | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-11 17:17:13 +0000 |
commit | c19ba104272c5444354f4b22c1411e634c935c83 (patch) | |
tree | 6e30fdfe3ad22e562c2c134993487ed3609fb7ac /chrome/browser/ui/browser_instant_controller.cc | |
parent | 2201708e3cb773d707bd92f496b61033650ca0fa (diff) | |
download | chromium_src-c19ba104272c5444354f4b22c1411e634c935c83.zip chromium_src-c19ba104272c5444354f4b22c1411e634c935c83.tar.gz chromium_src-c19ba104272c5444354f4b22c1411e634c935c83.tar.bz2 |
Add UMA action InstantExtended.ShowSRP.
chromeactions.txt also picked up some hashes for other actions
that were added but didn't update the file.
BUG=178525
TEST=Click on a clickable doodle or search through
the omnibox and check that the new UMA action is
shown on chrome://user-actions.
Review URL: https://chromiumcodereview.appspot.com/12546011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187308 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_instant_controller.cc')
-rw-r--r-- | chrome/browser/ui/browser_instant_controller.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc index d1628b1..5ffb7f0 100644 --- a/chrome/browser/ui/browser_instant_controller.cc +++ b/chrome/browser/ui/browser_instant_controller.cc @@ -107,7 +107,6 @@ bool BrowserInstantController::MaybeSwapInInstantNTPContents( // inserting instant_ntp into the tabstrip and will take ownership. ignore_result(instant_ntp.release()); } - content::RecordAction(UserMetricsAction("InstantExtended.ShowNTP")); return true; } @@ -239,6 +238,16 @@ void BrowserInstantController::ResetInstant(const std::string& pref_name) { void BrowserInstantController::ModeChanged(const search::Mode& old_mode, const search::Mode& new_mode) { + if (search::IsInstantExtendedAPIEnabled()) { + // Record some actions corresponding to the mode change. Note that to get + // the full story, it's necessary to look at other UMA actions as well, + // such as tab switches. + if (new_mode.is_search_results()) + content::RecordAction(UserMetricsAction("InstantExtended.ShowSRP")); + else if (new_mode.is_ntp()) + content::RecordAction(UserMetricsAction("InstantExtended.ShowNTP")); + } + // If mode is now |NTP|, send theme-related information to Instant. if (new_mode.is_ntp()) UpdateThemeInfo(); |