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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc

Issue 8800031: ntp: add more UMA to prove existing UMA is sane. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
index d40e5d809dcd1981d4f7ab2758dad4af052a70d3..d8741ff5aea8563d66134eebdff280a70483e3b1 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
@@ -90,6 +90,11 @@ void NewTabPageHandler::HandlePageSelected(const ListValue* args) {
int index = static_cast<int>(index_double);
PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs();
+ int previous_shown_page =
+ prefs->GetInteger(prefs::kNTPShownPage) >> kPageIdOffset;
+ UMA_HISTOGRAM_ENUMERATION("NewTabPage.PreviousSelectedPageType",
+ previous_shown_page, kHistogramEnumerationMax);
+
prefs->SetInteger(prefs::kNTPShownPage, page_id | index);
int shown_page_type = page_id >> kPageIdOffset;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698