Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "printing/print_settings.h" | 5 #include "printing/print_settings.h" |
| 6 | 6 |
| 7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "printing/print_job_constants.h" | 9 #include "printing/print_job_constants.h" |
| 10 #include "printing/units.h" | 10 #include "printing/units.h" |
| 11 | 11 |
| 12 namespace printing { | 12 namespace printing { |
| 13 | 13 |
| 14 std::string g_user_agent; | |
|
Lei Zhang
2015/11/05 21:37:23
I think this creates a static initializer. You pro
hal.canary
2015/11/05 22:16:48
done
| |
| 15 void SetAgent(const std::string& user_agent) { | |
| 16 g_user_agent = user_agent; | |
|
Lei Zhang
2015/11/05 21:37:23
2 space indents, not 4.
hal.canary
2015/11/05 22:16:48
done
| |
| 17 } | |
| 18 const std::string& GetAgent() { | |
| 19 return g_user_agent; | |
| 20 } | |
| 21 | |
| 22 | |
| 14 #if defined(USE_CUPS) | 23 #if defined(USE_CUPS) |
| 15 void GetColorModelForMode( | 24 void GetColorModelForMode( |
| 16 int color_mode, std::string* color_setting_name, std::string* color_value) { | 25 int color_mode, std::string* color_setting_name, std::string* color_value) { |
| 17 #if defined(OS_MACOSX) | 26 #if defined(OS_MACOSX) |
| 18 const char kCUPSColorMode[] = "ColorMode"; | 27 const char kCUPSColorMode[] = "ColorMode"; |
| 19 const char kCUPSColorModel[] = "ColorModel"; | 28 const char kCUPSColorModel[] = "ColorModel"; |
| 20 const char kCUPSPrintoutMode[] = "PrintoutMode"; | 29 const char kCUPSPrintoutMode[] = "PrintoutMode"; |
| 21 const char kCUPSProcessColorModel[] = "ProcessColorModel"; | 30 const char kCUPSProcessColorModel[] = "ProcessColorModel"; |
| 22 #else | 31 #else |
| 23 const char kCUPSColorMode[] = "cups-ColorMode"; | 32 const char kCUPSColorMode[] = "cups-ColorMode"; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 } | 235 } |
| 227 | 236 |
| 228 void PrintSettings::SetOrientation(bool landscape) { | 237 void PrintSettings::SetOrientation(bool landscape) { |
| 229 if (landscape_ != landscape) { | 238 if (landscape_ != landscape) { |
| 230 landscape_ = landscape; | 239 landscape_ = landscape; |
| 231 page_setup_device_units_.FlipOrientation(); | 240 page_setup_device_units_.FlipOrientation(); |
| 232 } | 241 } |
| 233 } | 242 } |
| 234 | 243 |
| 235 } // namespace printing | 244 } // namespace printing |
| OLD | NEW |