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

Unified Diff: printing/printing_context_mac.mm

Issue 6758014: PrintPreview: Added a helper function to get print job settings from dictionary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac build error. 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 | « printing/printing_context_cairo.cc ('k') | printing/printing_context_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context_mac.mm
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index cf6ea9f9498ed8fe18d04a2fe565fd0d8824037b..9357e77c99e437bc1c741c23d513764e8c60e49d 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -11,7 +11,6 @@
#include "base/mac/scoped_cftyperef.h"
#include "base/sys_string_conversions.h"
#include "base/values.h"
-#include "printing/print_job_constants.h"
#include "printing/print_settings_initializer_mac.h"
namespace printing {
@@ -93,14 +92,12 @@ PrintingContext::Result PrintingContextMac::UpdatePrintSettings(
print_info_.reset([[NSPrintInfo sharedPrintInfo] copy]);
bool landscape;
- if (!job_settings.GetBoolean(kSettingLandscape, &landscape))
- return OnError();
- settings_.SetOrientation(landscape);
-
std::string printer_name;
- if (!job_settings.GetString(kSettingPrinterName, &printer_name))
+ if (!GetSettingsFromDict(job_settings, &landscape, &printer_name))
return OnError();
+ settings_.SetOrientation(landscape);
+
if (!SetPrinter(printer_name))
return OnError();
« no previous file with comments | « printing/printing_context_cairo.cc ('k') | printing/printing_context_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698