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

Unified Diff: printing/printing_context_win.cc

Issue 8549031: base::Bind: Convert PrintingContext::PrintSettingsCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix. Created 9 years, 1 month 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/printing_context_win.h ('k') | printing/printing_context_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context_win.cc
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index 04b6481954445cc3a9062491022fbfa5e2958614..46093e77b41f0019180cf87a7db8978dff2da4b2 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -213,10 +213,9 @@ PrintingContextWin::~PrintingContextWin() {
ReleaseContext();
}
-void PrintingContextWin::AskUserForSettings(gfx::NativeView view,
- int max_pages,
- bool has_selection,
- PrintSettingsCallback* callback) {
+void PrintingContextWin::AskUserForSettings(
+ gfx::NativeView view, int max_pages, bool has_selection,
+ const PrintSettingsCallback& callback) {
#if !defined(USE_AURA)
DCHECK(!in_print_job_);
dialog_box_dismissed_ = false;
@@ -267,12 +266,11 @@ void PrintingContextWin::AskUserForSettings(gfx::NativeView view,
if ((*print_dialog_func_)(&dialog_options) != S_OK) {
ResetSettings();
- callback->Run(FAILED);
+ callback.Run(FAILED);
}
// TODO(maruel): Support PD_PRINTTOFILE.
- callback->Run(ParseDialogResultEx(dialog_options));
- delete callback;
+ callback.Run(ParseDialogResultEx(dialog_options));
#endif
}
« no previous file with comments | « printing/printing_context_win.h ('k') | printing/printing_context_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698