Commit 576f93b6 authored by Jesse Schettler's avatar Jesse Schettler Committed by Commit Bot

printing: Log when print preview is initiated

Add a new print preview event and log when print preview is initiated.

Bug: b:155084154
Change-Id: I400a97277b5c6d54c0221e52792b4e863feb81a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2168191
Commit-Queue: Jesse Schettler <jschettler@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#763521}
parent c372f671
...@@ -92,10 +92,11 @@ STATIC_ASSERT_ENUM(blink::kWebLongEdge, LONG_EDGE); ...@@ -92,10 +92,11 @@ STATIC_ASSERT_ENUM(blink::kWebLongEdge, LONG_EDGE);
STATIC_ASSERT_ENUM(blink::kWebShortEdge, SHORT_EDGE); STATIC_ASSERT_ENUM(blink::kWebShortEdge, SHORT_EDGE);
enum PrintPreviewHelperEvents { enum PrintPreviewHelperEvents {
PREVIEW_EVENT_REQUESTED, PREVIEW_EVENT_REQUESTED, // Received a request for a preview document.
PREVIEW_EVENT_CACHE_HIT, // Unused PREVIEW_EVENT_CACHE_HIT, // Unused.
PREVIEW_EVENT_CREATE_DOCUMENT, PREVIEW_EVENT_CREATE_DOCUMENT, // Started creating a preview document.
PREVIEW_EVENT_NEW_SETTINGS, // Unused PREVIEW_EVENT_NEW_SETTINGS, // Unused.
PREVIEW_EVENT_INITIATED, // Initiated print preview.
PREVIEW_EVENT_MAX, PREVIEW_EVENT_MAX,
}; };
...@@ -2387,6 +2388,11 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) { ...@@ -2387,6 +2388,11 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
return; return;
} }
} }
base::UmaHistogramEnumeration(print_preview_context_.IsForArc()
? "Arc.PrintPreview.PreviewEvent"
: "PrintPreview.PreviewEvent",
PREVIEW_EVENT_INITIATED, PREVIEW_EVENT_MAX);
Send(new PrintHostMsg_RequestPrintPreview(routing_id(), params)); Send(new PrintHostMsg_RequestPrintPreview(routing_id(), params));
} }
......
...@@ -54217,6 +54217,7 @@ Called by update_net_trust_anchors.py.--> ...@@ -54217,6 +54217,7 @@ Called by update_net_trust_anchors.py.-->
<int value="1" label="PREVIEW_EVENT_CACHE_HIT"/> <int value="1" label="PREVIEW_EVENT_CACHE_HIT"/>
<int value="2" label="PREVIEW_EVENT_CREATE_DOCUMENT"/> <int value="2" label="PREVIEW_EVENT_CREATE_DOCUMENT"/>
<int value="3" label="PREVIEW_EVENT_NEW_SETTINGS"/> <int value="3" label="PREVIEW_EVENT_NEW_SETTINGS"/>
<int value="4" label="PREVIEW_EVENT_INITIATED"/>
</enum> </enum>
<enum name="PrintPreviewPdfActionBuckets"> <enum name="PrintPreviewPdfActionBuckets">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment