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

Unified Diff: chrome/utility/utility_thread.cc

Issue 6594121: Revert 76553 - Applying factory pattern (through NativeMetafileFactory class)... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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/service/service_utility_process_host.cc ('k') | content/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/utility_thread.cc
===================================================================
--- chrome/utility/utility_thread.cc (revision 76554)
+++ chrome/utility/utility_thread.cc (working copy)
@@ -18,6 +18,7 @@
#include "chrome/common/serialized_script_value.h"
#include "chrome/common/utility_messages.h"
#include "chrome/common/web_resource/web_resource_unpacker.h"
+#include "printing/native_metafile.h"
#include "printing/page_range.h"
#include "printing/units.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -28,10 +29,7 @@
#if defined(OS_WIN)
#include "app/win/iat_patch_function.h"
-#include "base/scoped_ptr.h"
#include "base/win/scoped_handle.h"
-#include "printing/native_metafile_factory.h"
-#include "printing/native_metafile.h"
#endif
namespace {
@@ -137,15 +135,10 @@
const std::vector<printing::PageRange>& page_ranges) {
bool succeeded = false;
#if defined(OS_WIN)
- scoped_ptr<printing::NativeMetafile> metafile(
- printing::NativeMetafileFactory::CreateMetafile());
+ printing::NativeMetafile metafile;
int highest_rendered_page_number = 0;
- succeeded = RenderPDFToWinMetafile(pdf_file,
- metafile_path,
- render_area,
- render_dpi,
- page_ranges,
- metafile.get(),
+ succeeded = RenderPDFToWinMetafile(pdf_file, metafile_path, render_area,
+ render_dpi, page_ranges, &metafile,
&highest_rendered_page_number);
if (succeeded) {
Send(new UtilityHostMsg_RenderPDFPagesToMetafile_Succeeded(
« no previous file with comments | « chrome/service/service_utility_process_host.cc ('k') | content/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698