diff options
Diffstat (limited to 'chrome/renderer/print_web_view_helper_linux.cc')
-rw-r--r-- | chrome/renderer/print_web_view_helper_linux.cc | 5 |
1 files changed, 3 insertions, 2 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); } |