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

Unified Diff: printing/pdf_metafile_skia.cc

Issue 1343593002: Cleanup code in printing/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/pdf_metafile_skia.h ('k') | printing/print_settings_initializer_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/pdf_metafile_skia.cc
diff --git a/printing/pdf_metafile_skia.cc b/printing/pdf_metafile_skia.cc
index 1fb3557611c94ecccd4c57bfeb9a1a4e86b62dbc..78bcaec546523e236cc05854e802cf6095364d72 100644
--- a/printing/pdf_metafile_skia.cc
+++ b/printing/pdf_metafile_skia.cc
@@ -84,7 +84,7 @@ bool PdfMetafileSkia::Init() {
// Metafile::InitFromData is orthogonal to what the rest of
// PdfMetafileSkia does.
bool PdfMetafileSkia::InitFromData(const void* src_buffer,
- uint32 src_buffer_size) {
+ uint32_t src_buffer_size) {
data_->pdf_data_.reset(new SkMemoryStream(src_buffer, src_buffer_size, true));
return true;
}
@@ -153,14 +153,14 @@ bool PdfMetafileSkia::FinishDocument() {
return true;
}
-uint32 PdfMetafileSkia::GetDataSize() const {
+uint32_t PdfMetafileSkia::GetDataSize() const {
if (!data_->pdf_data_)
return 0;
- return base::checked_cast<uint32>(data_->pdf_data_->getLength());
+ return base::checked_cast<uint32_t>(data_->pdf_data_->getLength());
}
bool PdfMetafileSkia::GetData(void* dst_buffer,
- uint32 dst_buffer_size) const {
+ uint32_t dst_buffer_size) const {
if (!data_->pdf_data_)
return false;
return WriteAssetToBuffer(data_->pdf_data_.get(), dst_buffer,
@@ -215,7 +215,8 @@ bool PdfMetafileSkia::RenderPage(unsigned int page_number,
size_t length = data_->pdf_data_->getLength();
std::vector<uint8_t> buffer(length);
(void)WriteAssetToBuffer(data_->pdf_data_.get(), &buffer[0], length);
- data_->pdf_cg_.InitFromData(&buffer[0], base::checked_cast<uint32>(length));
+ data_->pdf_cg_.InitFromData(&buffer[0],
+ base::checked_cast<uint32_t>(length));
}
return data_->pdf_cg_.RenderPage(page_number, context, rect, params);
}
« no previous file with comments | « printing/pdf_metafile_skia.h ('k') | printing/print_settings_initializer_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698