summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/print_web_view_helper_linux.cc5
-rw-r--r--chrome/renderer/print_web_view_helper_mac.mm5
-rw-r--r--chrome/renderer/print_web_view_helper_win.cc5
3 files changed, 9 insertions, 6 deletions
diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc
index db471eb..6793e4c 100644
--- a/chrome/renderer/print_web_view_helper_linux.cc
+++ b/chrome/renderer/print_web_view_helper_linux.cc
@@ -190,8 +190,9 @@ bool PrintWebViewHelper::RenderPages(const PrintMsg_PrintPages_Params& params,
metafile->FinishDocument();
if (is_preview) {
- int preview_page_count = params.pages.size() ? params.pages.size() :
- *page_count;
+ int preview_page_count = params.pages.size();
+ if (!preview_page_count)
+ preview_page_count = *page_count;
ReportPreviewGenerationTime(base::TimeTicks::Now() - begin_time,
preview_page_count);
}
diff --git a/chrome/renderer/print_web_view_helper_mac.mm b/chrome/renderer/print_web_view_helper_mac.mm
index 4522030..1f1dedb 100644
--- a/chrome/renderer/print_web_view_helper_mac.mm
+++ b/chrome/renderer/print_web_view_helper_mac.mm
@@ -96,8 +96,9 @@ bool PrintWebViewHelper::CreatePreviewDocument(
metafile.FinishDocument();
- int preview_page_count = params.pages.size() ? params.pages.size() :
- page_count;
+ int preview_page_count = params.pages.size();
+ if (!preview_page_count)
+ preview_page_count = page_count;
ReportPreviewGenerationTime(base::TimeTicks::Now() - begin_time,
preview_page_count);
diff --git a/chrome/renderer/print_web_view_helper_win.cc b/chrome/renderer/print_web_view_helper_win.cc
index e74de84..3849788 100644
--- a/chrome/renderer/print_web_view_helper_win.cc
+++ b/chrome/renderer/print_web_view_helper_win.cc
@@ -171,8 +171,9 @@ bool PrintWebViewHelper::CreatePreviewDocument(
if (!metafile->FinishDocument())
NOTREACHED();
- int preview_page_count = params.pages.size() ? params.pages.size() :
- page_count;
+ int preview_page_count = params.pages.size();
+ if (!preview_page_count)
+ preview_page_count = page_count;
ReportPreviewGenerationTime(base::TimeTicks::Now() - begin_time,
preview_page_count);