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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 11194020: Creates GCP promo for ChromeOS users with no cloud printers. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with trunk. Created 8 years, 2 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 | « chrome/browser/ui/webui/print_preview/print_preview_data_source.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview/print_preview_handler.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index 3ce3bd3ce913ad1bca88aa860b16a156c1c9339e..0ace322db714f65ad5f4878111dc689ce7988c56 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -105,6 +105,7 @@ enum PrintSettingsBuckets {
enum UiBucketGroups {
DESTINATION_SEARCH,
+ GCP_PROMO,
UI_BUCKET_GROUP_BOUNDARY
};
@@ -117,6 +118,13 @@ enum PrintDestinationBuckets {
PRINT_DESTINATION_BUCKET_BOUNDARY
};
+enum GcpPromoBuckets {
+ PROMO_SHOWN,
+ PROMO_CLOSED,
+ PROMO_CLICKED,
+ GCP_PROMO_BUCKET_BOUNDARY
+};
+
void ReportUserActionHistogram(enum UserActionBuckets event) {
UMA_HISTOGRAM_ENUMERATION("PrintPreview.UserAction", event,
USERACTION_BUCKET_BOUNDARY);
@@ -132,6 +140,11 @@ void ReportPrintDestinationHistogram(enum PrintDestinationBuckets event) {
PRINT_DESTINATION_BUCKET_BOUNDARY);
}
+void ReportGcpPromoHistogram(enum GcpPromoBuckets event) {
+ UMA_HISTOGRAM_ENUMERATION("PrintPreview.GcpPromo", event,
+ GCP_PROMO_BUCKET_BOUNDARY);
+}
+
// Name of a dictionary field holding cloud print related data;
const char kAppState[] = "appState";
// Name of a dictionary field holding the initiator tab title.
@@ -705,12 +718,20 @@ void PrintPreviewHandler::HandleReportUiEvent(const ListValue* args) {
switch (ui_bucket_group) {
case DESTINATION_SEARCH: {
enum PrintDestinationBuckets event =
- static_cast<enum PrintDestinationBuckets>(event_number);
+ static_cast<enum PrintDestinationBuckets>(event_number);
if (event >= PRINT_DESTINATION_BUCKET_BOUNDARY)
return;
ReportPrintDestinationHistogram(event);
break;
}
+ case GCP_PROMO: {
+ enum GcpPromoBuckets event =
+ static_cast<enum GcpPromoBuckets>(event_number);
+ if (event >= GCP_PROMO_BUCKET_BOUNDARY)
+ return;
+ ReportGcpPromoHistogram(event);
+ break;
+ }
default:
break;
}
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_data_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698