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

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 12546011: Add UMA action InstantExtended.ShowSRP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | chrome/tools/chromeactions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_instant_controller.cc
===================================================================
--- chrome/browser/ui/browser_instant_controller.cc (revision 186976)
+++ chrome/browser/ui/browser_instant_controller.cc (working copy)
@@ -107,7 +107,6 @@
// 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::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();
« no previous file with comments | « no previous file | chrome/tools/chromeactions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698