summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-29 07:04:02 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-29 07:04:02 +0000
commit3788538bb7cf4b5ef46a3ad98eecb641ad59c31a (patch)
tree4e5fd2770b26a36246fee4d0c2c10b6c0a582fa0
parent467eb3c83152e87a51fafa704189dceb4a3f89f9 (diff)
downloadchromium_src-3788538bb7cf4b5ef46a3ad98eecb641ad59c31a.zip
chromium_src-3788538bb7cf4b5ef46a3ad98eecb641ad59c31a.tar.gz
chromium_src-3788538bb7cf4b5ef46a3ad98eecb641ad59c31a.tar.bz2
Fix clang complaint.
BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7086022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87197 0039d316-1c4b-4281-b951-d872f2087c98
-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);