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

Unified Diff: chrome/browser/printing/print_dialog_gtk.cc

Issue 6611032: Unifying NativeMetafile class interface (as much as possible) for Linux, Mac, Win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Making virtual methods not virtual (for clang bots) 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 | « no previous file | chrome/common/common_param_traits_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_dialog_gtk.cc
diff --git a/chrome/browser/printing/print_dialog_gtk.cc b/chrome/browser/printing/print_dialog_gtk.cc
index 12e925a80bd3c73eb64049ea84db6688b9f73b2a..190feeb0b195fad3ab1172c2947df17915ed6f8a 100644
--- a/chrome/browser/printing/print_dialog_gtk.cc
+++ b/chrome/browser/printing/print_dialog_gtk.cc
@@ -156,15 +156,10 @@ void PrintDialogGtk::SaveDocumentToDisk(const NativeMetafile* metafile,
error = true;
}
- if (!error) {
- base::FileDescriptor temp_file_fd;
- temp_file_fd.fd = open(path_to_pdf_.value().c_str(), O_WRONLY);
- temp_file_fd.auto_close = true;
- if (!metafile->SaveTo(temp_file_fd)) {
- LOG(ERROR) << "Saving metafile failed";
- file_util::Delete(path_to_pdf_, false);
- error = true;
- }
+ if (!error && !metafile->SaveTo(path_to_pdf_)) {
+ LOG(ERROR) << "Saving metafile failed";
+ file_util::Delete(path_to_pdf_, false);
+ error = true;
}
// Done saving, let PrintDialogGtk::PrintDocument() continue.
« no previous file with comments | « no previous file | chrome/common/common_param_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698