| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/fake_upstart_client.h" | 5 #include "chromeos/dbus/fake_upstart_client.h" |
| 6 | 6 |
| 7 #include "chromeos/dbus/dbus_thread_manager.h" | 7 #include "chromeos/dbus/dbus_thread_manager.h" |
| 8 #include "chromeos/dbus/fake_auth_policy_client.h" | 8 #include "chromeos/dbus/fake_auth_policy_client.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| 11 | 11 |
| 12 FakeUpstartClient::FakeUpstartClient() {} | 12 FakeUpstartClient::FakeUpstartClient() {} |
| 13 | 13 |
| 14 FakeUpstartClient::~FakeUpstartClient() {} | 14 FakeUpstartClient::~FakeUpstartClient() {} |
| 15 | 15 |
| 16 void FakeUpstartClient::Init(dbus::Bus* bus) {} | 16 void FakeUpstartClient::Init(dbus::Bus* bus) {} |
| 17 | 17 |
| 18 void FakeUpstartClient::StartAuthPolicyService() { | 18 void FakeUpstartClient::StartAuthPolicyService() { |
| 19 static_cast<FakeAuthPolicyClient*>( | 19 static_cast<FakeAuthPolicyClient*>( |
| 20 DBusThreadManager::Get()->GetAuthPolicyClient()) | 20 DBusThreadManager::Get()->GetAuthPolicyClient()) |
| 21 ->set_started(true); | 21 ->set_started(true); |
| 22 } | 22 } |
| 23 | 23 |
| 24 void FakeUpstartClient::RestartAuthPolicyService() { |
| 25 FakeAuthPolicyClient* authpolicy_client = static_cast<FakeAuthPolicyClient*>( |
| 26 DBusThreadManager::Get()->GetAuthPolicyClient()); |
| 27 DLOG_IF(WARNING, !authpolicy_client->started()) |
| 28 << "Trying to restart authpolicyd which is not started"; |
| 29 authpolicy_client->set_started(true); |
| 30 } |
| 31 |
| 24 } // namespace chromeos | 32 } // namespace chromeos |
| OLD | NEW |