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

Unified Diff: chrome/renderer/printing/print_web_view_helper.cc

Issue 15716006: Fixed reporting of PrintPreview.PageCount.PrintToCloudPrintWebDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
Index: chrome/renderer/printing/print_web_view_helper.cc
diff --git a/chrome/renderer/printing/print_web_view_helper.cc b/chrome/renderer/printing/print_web_view_helper.cc
index 310116e7ab6029387f482e728e1c6740c7f61168..0b71431ace333eeb3be30ada358160f6578383dc 100644
--- a/chrome/renderer/printing/print_web_view_helper.cc
+++ b/chrome/renderer/printing/print_web_view_helper.cc
@@ -1307,21 +1307,28 @@ void PrintWebViewHelper::PrintPages() {
return DidFinishPrinting(FAIL_PRINT);
}
-#if !defined(OS_CHROMEOS)
const PrintMsg_PrintPages_Params& params = *print_pages_params_;
const PrintMsg_Print_Params& print_params = params.params;
+#if !defined(OS_CHROMEOS)
// TODO(vitalybuka): should be page_count or valid pages from params.pages.
// See http://crbug.com/161576
Send(new PrintHostMsg_DidGetPrintedPagesCount(routing_id(),
print_params.document_cookie,
page_count));
+#endif // !defined(OS_CHROMEOS)
+
if (print_params.preview_ui_id < 0) {
// Printing for system dialog.
int printed_count = params.pages.empty() ? page_count : params.pages.size();
+#if !defined(OS_CHROMEOS)
UMA_HISTOGRAM_COUNTS("PrintPreview.PageCount.SystemDialog", printed_count);
- }
+#else
+ UMA_HISTOGRAM_COUNTS("PrintPreview.PageCount.PrintToCloudPrintWebDialog",
+ printed_count);
#endif // !defined(OS_CHROMEOS)
+ }
+
if (!PrintPagesNative(prep_frame_view_->frame(), prep_frame_view_->node(),
page_count, prep_frame_view_->GetPrintCanvasSize())) {

Powered by Google App Engine
This is Rietveld 408576698