Cleanup: Make the PrintingContext::UpdatePrintSettings code more consistent across platfroms.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6932021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84154 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index 7a64df6..eb7cc32 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -6,6 +6,8 @@
 
 #include <winspool.h>
 
+#include <algorithm>
+
 #include "base/i18n/file_util_icu.h"
 #include "base/i18n/time_formatting.h"
 #include "base/message_loop.h"
@@ -305,22 +307,27 @@
     const PageRanges& ranges) {
   DCHECK(!in_print_job_);
 
-  bool is_landscape, is_collate, is_color, is_printToPDF;
+  bool collate;
+  bool color;
+  bool landscape;
+  bool print_to_pdf;
+  int copies;
+  int duplex_mode;
   string16 printer_name;
-  int copies, duplex_mode;
-  if (!job_settings.GetBoolean(kSettingLandscape, &is_landscape) ||
-      !job_settings.GetString(kSettingPrinterName, &printer_name) ||
-      !job_settings.GetInteger(kSettingCopies, &copies) ||
-      !job_settings.GetBoolean(kSettingCollate, &is_collate) ||
+
+  if (!job_settings.GetBoolean(kSettingLandscape, &landscape) ||
+      !job_settings.GetBoolean(kSettingCollate, &collate) ||
+      !job_settings.GetBoolean(kSettingColor, &color) ||
+      !job_settings.GetBoolean(kSettingPrintToPDF, &print_to_pdf) ||
       !job_settings.GetInteger(kSettingDuplexMode, &duplex_mode) ||
-      !job_settings.GetBoolean(kSettingColor, &is_color) ||
-      !job_settings.GetBoolean(kSettingPrintToPDF, &is_printToPDF)) {
+      !job_settings.GetInteger(kSettingCopies, &copies) ||
+      !job_settings.GetString(kSettingPrinterName, &printer_name)) {
     return OnError();
   }
 
-  if (is_printToPDF) {
+  if (print_to_pdf) {
     // Pseudo printer: handle orientation and ranges only.
-    settings_.SetOrientation(is_landscape);
+    settings_.SetOrientation(landscape);
     settings_.ranges = ranges;
     return OK;
   }
@@ -356,10 +363,10 @@
     return OnError();
   }
 
-  dev_mode->dmColor = is_color ? DMCOLOR_COLOR : DMCOLOR_MONOCHROME;
+  dev_mode->dmColor = color ? DMCOLOR_COLOR : DMCOLOR_MONOCHROME;
   dev_mode->dmCopies = std::max(copies, 1);
   if (dev_mode->dmCopies > 1)  // do not change collate unless multiple copies
-    dev_mode->dmCollate = is_collate ? DMCOLLATE_TRUE : DMCOLLATE_FALSE;
+    dev_mode->dmCollate = collate ? DMCOLLATE_TRUE : DMCOLLATE_FALSE;
   switch (duplex_mode) {
     case LONG_EDGE:
       dev_mode->dmDuplex = DMDUP_VERTICAL;
@@ -371,8 +378,7 @@
       dev_mode->dmDuplex = DMDUP_SIMPLEX;
       break;
   }
-  dev_mode->dmOrientation = is_landscape ? DMORIENT_LANDSCAPE :
-                                           DMORIENT_PORTRAIT;
+  dev_mode->dmOrientation = landscape ? DMORIENT_LANDSCAPE : DMORIENT_PORTRAIT;
 
   // Update data using DocumentProperties.
   if (DocumentProperties(NULL, printer, printer_name_wide, dev_mode, dev_mode,