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

Unified Diff: content/renderer/render_view_impl.cc

Issue 2415953003: Add UMA for documents calling window.print(). (Closed)
Patch Set: Created 4 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 92f8cf167e806239b3611a72703de76ca50292b6..9aefa5eafa876520cc01f54156f77598cff7187f 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1626,6 +1626,16 @@ WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() {
}
void RenderViewImpl::printPage(WebLocalFrame* frame) {
+ UMA_HISTOGRAM_BOOLEAN("PrintPreview.InitiatedByScript",
+ frame->top() == frame);
+
+ // Logging whether the top frame is remote is sufficient in this case. If
+ // the top frame is local, the printing code will function correctly and
+ // the frame itself will be printed, so the cases this histogram tracks is
+ // where printing of a subframe will fail as of now.
+ UMA_HISTOGRAM_BOOLEAN("PrintPreview.OutOfProcessSubframe",
+ frame->top()->isWebRemoteFrame());
+
FOR_EACH_OBSERVER(RenderViewObserver, observers_,
PrintPage(frame, input_handler().handling_input_event()));
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698