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

Unified Diff: printing/image.cc

Issue 6696076: Adding CreateFromData to NativeMetafileFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 9 years, 9 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/renderer/print_web_view_helper_win.cc ('k') | printing/native_metafile_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/image.cc
diff --git a/printing/image.cc b/printing/image.cc
index 2f5d7e3e89d50e76c4370fd1f0f4d9153813fbe3..87a6f7e3e65253653e72c71410c2c6094c32f0b8 100644
--- a/printing/image.cc
+++ b/printing/image.cc
@@ -147,8 +147,10 @@ bool Image::LoadPng(const std::string& compressed) {
bool Image::LoadMetafile(const std::string& data) {
DCHECK(!data.empty());
scoped_ptr<NativeMetafile> metafile(
- printing::NativeMetafileFactory::Create());
- metafile->InitFromData(data.data(), data.size());
+ printing::NativeMetafileFactory::CreateFromData(data.data(),
+ data.size()));
+ if(!metafile.get())
+ return false;
return LoadMetafile(*metafile);
}
« no previous file with comments | « chrome/renderer/print_web_view_helper_win.cc ('k') | printing/native_metafile_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698