OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chromeos/dbus/power_policy_controller.h" | 5 #include "chromeos/dbus/power_policy_controller.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "chromeos/dbus/dbus_thread_manager.h" | 11 #include "chromeos/dbus/dbus_thread_manager.h" |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Appends a description of |field|, a field within |delays|, a | 17 // Appends a description of |field|, a field within |delays|, a |
18 // power_manager::PowerManagementPolicy::Delays object, to |str|, an | 18 // power_manager::PowerManagementPolicy::Delays object, to |str|, an |
19 // std::string, if the field is set. |name| is a char* describing the | 19 // std::string, if the field is set. |name| is a char* describing the |
20 // field. | 20 // field. |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 if (!reason.empty()) | 251 if (!reason.empty()) |
252 policy.set_reason(reason); | 252 policy.set_reason(reason); |
253 client_->SetPolicy(policy); | 253 client_->SetPolicy(policy); |
254 } | 254 } |
255 | 255 |
256 void PowerPolicyController::SendEmptyPolicy() { | 256 void PowerPolicyController::SendEmptyPolicy() { |
257 client_->SetPolicy(power_manager::PowerManagementPolicy()); | 257 client_->SetPolicy(power_manager::PowerManagementPolicy()); |
258 } | 258 } |
259 | 259 |
260 } // namespace chromeos | 260 } // namespace chromeos |
OLD | NEW |