| Index: printing/image.cc
|
| diff --git a/printing/image.cc b/printing/image.cc
|
| index 1116f32e958c0b44e409284053cbe3e8c2b2c72d..bb3233ef0e78c2dca740f453437bde607df00c8f 100644
|
| --- a/printing/image.cc
|
| +++ b/printing/image.cc
|
| @@ -7,6 +7,8 @@
|
| #include "base/file_util.h"
|
| #include "base/md5.h"
|
| #include "base/string_number_conversions.h"
|
| +#include "printing/metafile_factory.h"
|
| +#include "base/scoped_ptr.h"
|
| #include "third_party/skia/include/core/SkColor.h"
|
| #include "ui/gfx/codec/png_codec.h"
|
|
|
| @@ -144,9 +146,10 @@ bool Image::LoadPng(const std::string& compressed) {
|
|
|
| bool Image::LoadMetafile(const std::string& data) {
|
| DCHECK(!data.empty());
|
| - NativeMetafile metafile;
|
| - metafile.Init(data.data(), data.size());
|
| - return LoadMetafile(metafile);
|
| + scoped_ptr<NativeMetafile> metafile(
|
| + printing::MetafileFactory::GetMetafile());
|
| + metafile->Init(data.data(), data.size());
|
| + return LoadMetafile(*metafile.get());
|
| }
|
|
|
| } // namespace printing
|
|
|