| Index: chrome/service/service_utility_process_host.cc
|
| diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc
|
| index b63e27f9d7f8661de5f11428c9effe780a826320..17a873872e224cdccc97084b27a2da312ea4a9ef 100644
|
| --- a/chrome/service/service_utility_process_host.cc
|
| +++ b/chrome/service/service_utility_process_host.cc
|
| @@ -9,11 +9,13 @@
|
| #include "base/file_util.h"
|
| #include "base/message_loop.h"
|
| #include "base/message_loop_proxy.h"
|
| +#include "base/scoped_ptr.h"
|
| #include "base/scoped_temp_dir.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/utility_messages.h"
|
| #include "ipc/ipc_switches.h"
|
| #include "printing/native_metafile.h"
|
| +#include "printing/native_metafile_factory.h"
|
| #include "printing/page_range.h"
|
| #include "ui/base/ui_base_switches.h"
|
| #include "ui/gfx/rect.h"
|
| @@ -202,13 +204,15 @@ void ServiceUtilityProcessHost::Client::MetafileAvailable(
|
| if (!scratch_metafile_dir.Set(metafile_path.DirName()))
|
| LOG(WARNING) << "Unable to set scratch metafile directory";
|
| #if defined(OS_WIN)
|
| - printing::NativeMetafile metafile;
|
| - if (!metafile.CreateFromFile(metafile_path)) {
|
| + scoped_ptr<printing::NativeMetafile> metafile(
|
| + printing::MetafileFactory::GetMetafile());
|
| + if (!metafile->CreateFromFile(metafile_path)) {
|
| OnRenderPDFPagesToMetafileFailed();
|
| } else {
|
| - OnRenderPDFPagesToMetafileSucceeded(metafile, highest_rendered_page_number);
|
| + OnRenderPDFPagesToMetafileSucceeded(*metafile.get(),
|
| + highest_rendered_page_number);
|
| // Close it so that ScopedTempDir can delete the folder.
|
| - metafile.CloseEmf();
|
| + metafile->CloseEmf();
|
| }
|
| #endif // defined(OS_WIN)
|
| }
|
|
|