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/system_clock_client.h" | 5 #include "chromeos/dbus/system_clock_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 void TimeUpdatedConnected(const std::string& interface_name, | 86 void TimeUpdatedConnected(const std::string& interface_name, |
87 const std::string& signal_name, | 87 const std::string& signal_name, |
88 bool success) { | 88 bool success) { |
89 LOG_IF(ERROR, !success) | 89 LOG_IF(ERROR, !success) |
90 << "Failed to connect to TimeUpdated signal."; | 90 << "Failed to connect to TimeUpdated signal."; |
91 } | 91 } |
92 | 92 |
93 // Callback for CanSetTime method. | 93 // Callback for CanSetTime method. |
94 void OnGetCanSet(dbus::Response* response) { | 94 void OnGetCanSet(dbus::Response* response) { |
95 if (!response) { | 95 if (!response) { |
96 LOG(WARNING) << "CanSetTime request failed."; | 96 VLOG(1) << "CanSetTime request failed."; |
97 return; | 97 return; |
98 } | 98 } |
99 | 99 |
100 dbus::MessageReader reader(response); | 100 dbus::MessageReader reader(response); |
101 bool can_set_time; | 101 bool can_set_time; |
102 if (!reader.PopBool(&can_set_time)) { | 102 if (!reader.PopBool(&can_set_time)) { |
103 LOG(ERROR) << "CanSetTime response invalid: " << response->ToString(); | 103 LOG(ERROR) << "CanSetTime response invalid: " << response->ToString(); |
104 return; | 104 return; |
105 } | 105 } |
106 | 106 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 SystemClockClient::~SystemClockClient() { | 152 SystemClockClient::~SystemClockClient() { |
153 } | 153 } |
154 | 154 |
155 // static | 155 // static |
156 SystemClockClient* SystemClockClient::Create() { | 156 SystemClockClient* SystemClockClient::Create() { |
157 return new SystemClockClientImpl(); | 157 return new SystemClockClientImpl(); |
158 } | 158 } |
159 | 159 |
160 } // namespace chromeos | 160 } // namespace chromeos |
OLD | NEW |