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

Unified Diff: printing/pdf_metafile_skia.cc

Issue 11953003: Make printing build on Win64 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | « printing/image.cc ('k') | printing/print_destination_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/pdf_metafile_skia.cc
===================================================================
--- printing/pdf_metafile_skia.cc (revision 177853)
+++ printing/pdf_metafile_skia.cc (working copy)
@@ -9,6 +9,7 @@
#include "base/hash_tables.h"
#include "base/metrics/histogram.h"
#include "base/posix/eintr_wrapper.h"
+#include "base/safe_numerics.h"
#include "skia/ext/vector_platform_device_skia.h"
#include "third_party/skia/include/core/SkData.h"
#include "third_party/skia/include/core/SkRefCnt.h"
@@ -110,7 +111,7 @@
}
uint32 PdfMetafileSkia::GetDataSize() const {
- return data_->pdf_stream_.getOffset();
+ return base::checked_numeric_cast<uint32>(data_->pdf_stream_.getOffset());
}
bool PdfMetafileSkia::GetData(void* dst_buffer,
@@ -238,7 +239,8 @@
return NULL;
PdfMetafileSkia* metafile = new PdfMetafileSkia;
- metafile->InitFromData(data->bytes(), data->size());
+ metafile->InitFromData(data->bytes(),
+ base::checked_numeric_cast<uint32>(data->size()));
return metafile;
}
« no previous file with comments | « printing/image.cc ('k') | printing/print_destination_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698