summaryrefslogtreecommitdiffstats
path: root/printing/printing_context_win.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 22:57:35 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 22:57:35 +0000
commit128bec3cd249be7675fec39d184da047d7fbab76 (patch)
treee43106dea3eeee586c22cb0e994df0fd49414246 /printing/printing_context_win.cc
parentbc669d1f61befa7639d5cebb051bd4ccd85bee90 (diff)
downloadchromium_src-128bec3cd249be7675fec39d184da047d7fbab76.zip
chromium_src-128bec3cd249be7675fec39d184da047d7fbab76.tar.gz
chromium_src-128bec3cd249be7675fec39d184da047d7fbab76.tar.bz2
Use the existing PRINTPAGERANGE rather than allocating a new one.
BUG=68307 TEST=Dr. Memory no longer complains. Review URL: http://codereview.chromium.org/5998010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/printing_context_win.cc')
-rw-r--r--printing/printing_context_win.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index 9afa511..c5130c0 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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,7 +6,6 @@
#include <winspool.h>
-#include "base/file_util.h"
#include "base/i18n/file_util_icu.h"
#include "base/i18n/time_formatting.h"
#include "base/message_loop.h"
@@ -188,12 +187,11 @@ void PrintingContextWin::AskUserForSettings(HWND view,
dialog_options.Flags |= PD_NOPAGENUMS;
}
- {
- if ((*print_dialog_func_)(&dialog_options) != S_OK) {
- ResetSettings();
- callback->Run(FAILED);
- }
+ if ((*print_dialog_func_)(&dialog_options) != S_OK) {
+ ResetSettings();
+ callback->Run(FAILED);
}
+
// TODO(maruel): Support PD_PRINTTOFILE.
callback->Run(ParseDialogResultEx(dialog_options));
}