| 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;
|
| }
|
|
|