Index: chrome/renderer/print_web_view_helper_linux.cc |
diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc |
index c9d8f38f760d62a07d0485c7312a2a300f5b253a..771d37b7de8de4778891eed1b2918e5c3ad7fc0f 100644 |
--- a/chrome/renderer/print_web_view_helper_linux.cc |
+++ b/chrome/renderer/print_web_view_helper_linux.cc |
@@ -38,12 +38,12 @@ void PrintWebViewHelper::RenderPreviewPage(int page_number) { |
print_preview_context_.RenderedPreviewPage( |
base::TimeTicks::Now() - begin_time); |
- printing::Metafile* page_metafile = NULL; |
+ scoped_ptr<printing::Metafile> page_metafile; |
if (print_preview_context_.IsModifiable()) { |
- page_metafile = reinterpret_cast<printing::PreviewMetafile*>( |
- print_preview_context_.metafile())->GetMetafileForCurrentPage(); |
+ page_metafile.reset(reinterpret_cast<printing::PreviewMetafile*>( |
+ print_preview_context_.metafile())->GetMetafileForCurrentPage()); |
} |
- PreviewPageRendered(page_number, page_metafile); |
+ PreviewPageRendered(page_number, page_metafile.get()); |
} |
bool PrintWebViewHelper::PrintPages(const PrintMsg_PrintPages_Params& params, |