summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-30 16:40:12 +0000
committerkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-30 16:40:12 +0000
commitf803c93bd6a675190fd479ad91353b1dc8c8e1ec (patch)
tree16d68922929dc4af4321ae8ac3f1d7b6b892617d
parent36492a3bb4df223e44e392d8a3467be9fef51a6e (diff)
downloadchromium_src-f803c93bd6a675190fd479ad91353b1dc8c8e1ec.zip
chromium_src-f803c93bd6a675190fd479ad91353b1dc8c8e1ec.tar.gz
chromium_src-f803c93bd6a675190fd479ad91353b1dc8c8e1ec.tar.bz2
PrintPreview: Add a print job constant for "printerName".
BUG=none TEST=none Review URL: http://codereview.chromium.org/6756016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79843 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--printing/print_job_constants.cc3
-rw-r--r--printing/print_job_constants.h1
-rw-r--r--printing/printing_context_mac.mm2
3 files changed, 5 insertions, 1 deletions
diff --git a/printing/print_job_constants.cc b/printing/print_job_constants.cc
index f4eb542..115896b 100644
--- a/printing/print_job_constants.cc
+++ b/printing/print_job_constants.cc
@@ -12,4 +12,7 @@ const char kSettingColor[] = "color";
// Page orientation: true for landscape, false for portrait.
const char kSettingLandscape[] = "landscape";
+// Printer name.
+const char kSettingPrinterName[] = "printerName";
+
} // namespace printing
diff --git a/printing/print_job_constants.h b/printing/print_job_constants.h
index ce224af..7cde21a 100644
--- a/printing/print_job_constants.h
+++ b/printing/print_job_constants.h
@@ -9,6 +9,7 @@ namespace printing {
extern const char kSettingColor[];
extern const char kSettingLandscape[];
+extern const char kSettingPrinterName[];
} // namespace printing
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index 65e707f..cf6ea9f 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -98,7 +98,7 @@ PrintingContext::Result PrintingContextMac::UpdatePrintSettings(
settings_.SetOrientation(landscape);
std::string printer_name;
- if (!job_settings.GetString("printerName", &printer_name))
+ if (!job_settings.GetString(kSettingPrinterName, &printer_name))
return OnError();
if (!SetPrinter(printer_name))