| 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/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "printing/print_job_constants.h" | 10 #include "printing/print_job_constants.h" |
| 11 #include "printing/units.h" | 11 #include "printing/units.h" |
| 12 | 12 |
| 13 namespace printing { | 13 namespace printing { |
| 14 | 14 |
| 15 base::LazyInstance<std::string>::DestructorAtExit g_user_agent; | 15 base::LazyInstance<std::string>::Leaky g_user_agent; |
| 16 | 16 |
| 17 void SetAgent(const std::string& user_agent) { | 17 void SetAgent(const std::string& user_agent) { |
| 18 g_user_agent.Get() = user_agent; | 18 g_user_agent.Get() = user_agent; |
| 19 } | 19 } |
| 20 | 20 |
| 21 const std::string& GetAgent() { | 21 const std::string& GetAgent() { |
| 22 return g_user_agent.Get(); | 22 return g_user_agent.Get(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 #if defined(USE_CUPS) | 25 #if defined(USE_CUPS) |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 } | 288 } |
| 289 | 289 |
| 290 void PrintSettings::SetOrientation(bool landscape) { | 290 void PrintSettings::SetOrientation(bool landscape) { |
| 291 if (landscape_ != landscape) { | 291 if (landscape_ != landscape) { |
| 292 landscape_ = landscape; | 292 landscape_ = landscape; |
| 293 page_setup_device_units_.FlipOrientation(); | 293 page_setup_device_units_.FlipOrientation(); |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 | 296 |
| 297 } // namespace printing | 297 } // namespace printing |
| OLD | NEW |