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

Unified Diff: printing/image.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 | « printing/emf_win_unittest.cc ('k') | printing/native_metafile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/image.cc
===================================================================
--- printing/image.cc (revision 76554)
+++ printing/image.cc (working copy)
@@ -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::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
« no previous file with comments | « printing/emf_win_unittest.cc ('k') | printing/native_metafile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698