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

Unified Diff: printing/pdf_metafile_skia.cc

Issue 1232783007: Cleanup: Fix some misc nits in printing code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « chrome/browser/printing/print_preview_message_handler.cc ('k') | no next file » | 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 f96d6c088524f3d283844583b668818d8f86298a..1fb3557611c94ecccd4c57bfeb9a1a4e86b62dbc 100644
--- a/printing/pdf_metafile_skia.cc
+++ b/printing/pdf_metafile_skia.cc
@@ -33,6 +33,7 @@
#endif
namespace {
+
// This struct represents all the data we need to draw and redraw this
// page into a SkDocument.
struct Page {
@@ -46,11 +47,10 @@ struct Page {
float scale_factor_;
skia::RefPtr<SkPicture> content_;
};
-} // namespace
-static bool WriteAssetToBuffer(const SkStreamAsset* asset,
- void* buffer,
- size_t size) {
+bool WriteAssetToBuffer(const SkStreamAsset* asset,
+ void* buffer,
+ size_t size) {
// Calling duplicate() keeps original asset state unchanged.
scoped_ptr<SkStreamAsset> assetCopy(asset->duplicate());
size_t length = assetCopy->getLength();
@@ -59,6 +59,8 @@ static bool WriteAssetToBuffer(const SkStreamAsset* asset,
return (length == assetCopy->read(buffer, length));
}
+} // namespace
+
namespace printing {
struct PdfMetafileSkiaData {
« no previous file with comments | « chrome/browser/printing/print_preview_message_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698