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

Unified Diff: content/renderer/render_view_impl.cc

Issue 2412753002: Add UMA for documents calling window.print(). (Closed)
Patch Set: Add UMA for out-of-process iframes printing. 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') | tools/metrics/histograms/histograms.xml » ('J')
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 6a461f64fb66edfba8a0d3dc9e8e01d9371c4634..7af8c72a39f2866e52d503ee80fee5235ae26fae 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1631,6 +1631,15 @@ WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() {
}
void RenderViewImpl::printPage(WebLocalFrame* frame) {
+ UMA_HISTOGRAM_BOOLEAN("Printing.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("Printing.OutOfProcessSubframe",
+ frame->top()->isWebRemoteFrame());
Lei Zhang 2016/10/11 23:42:59 frame->top() won't ever be a nullptr, right?
nasko 2016/10/11 23:44:17 Yes, it should never be null, but can be either lo
Lei Zhang 2016/10/11 23:51:14 Acknowledged.
+
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') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698