diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 17:20:21 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 17:20:21 +0000 |
commit | 7756e5b1e7919fe530ff1ff27503d4893efcee13 (patch) | |
tree | 5b7ac359e22bf58e5ae72fbdc57a6b6c92efe285 /printing/image.cc | |
parent | f3e9d6e12d38ea05e476899eb2620c57d351f74b (diff) | |
download | chromium_src-7756e5b1e7919fe530ff1ff27503d4893efcee13.zip chromium_src-7756e5b1e7919fe530ff1ff27503d4893efcee13.tar.gz chromium_src-7756e5b1e7919fe530ff1ff27503d4893efcee13.tar.bz2 |
Revert 76553 - Applying factory pattern (through NativeMetafileFactory class). It is used to retrieve different printing contexts (based on the platform and user preferences).
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/6544028
TBR=dpapad@chromium.org
Review URL: http://codereview.chromium.org/6594121
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/image.cc')
-rw-r--r-- | printing/image.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/printing/image.cc b/printing/image.cc index a99e307..1116f32 100644 --- a/printing/image.cc +++ b/printing/image.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,9 +6,7 @@ #include "base/file_util.h" #include "base/md5.h" -#include "base/scoped_ptr.h" #include "base/string_number_conversions.h" -#include "printing/native_metafile_factory.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/codec/png_codec.h" @@ -146,10 +144,9 @@ bool Image::LoadPng(const std::string& compressed) { bool Image::LoadMetafile(const std::string& data) { DCHECK(!data.empty()); - scoped_ptr<NativeMetafile> metafile( - printing::NativeMetafileFactory::CreateMetafile()); - metafile->Init(data.data(), data.size()); - return LoadMetafile(*metafile); + NativeMetafile metafile; + metafile.Init(data.data(), data.size()); + return LoadMetafile(metafile); } } // namespace printing |