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

Unified Diff: printing/emf_win.cc

Issue 547203002: Delete temporarily dir for PDF to EMF conversion after all EMF files closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mon Sep 8 12:19:46 PDT 2014 Created 6 years, 3 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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/emf_win.cc
diff --git a/printing/emf_win.cc b/printing/emf_win.cc
index d9472f9cc3fcf6c332d3dd3bf5f778670a3ef0fb..b6c9b4fc6d1c39e4b9a0f321de7e06d710e28b60 100644
--- a/printing/emf_win.cc
+++ b/printing/emf_win.cc
@@ -169,9 +169,14 @@ Emf::Emf() : emf_(NULL), hdc_(NULL), page_count_(0) {
}
Emf::~Emf() {
+ Close();
+}
+
+void Emf::Close() {
DCHECK(!hdc_);
if (emf_)
DeleteEnhMetaFile(emf_);
+ emf_ = NULL;
}
bool Emf::InitToFile(const base::FilePath& metafile_path) {
« no previous file with comments | « printing/emf_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698