| 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 "chromeos/dbus/session_manager_client.h" | 5 #include "chromeos/dbus/session_manager_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 login_manager::kSessionManagerInterface, | 302 login_manager::kSessionManagerInterface, |
| 303 login_manager::kSessionManagerCheckArcAvailability); | 303 login_manager::kSessionManagerCheckArcAvailability); |
| 304 | 304 |
| 305 session_manager_proxy_->CallMethod( | 305 session_manager_proxy_->CallMethod( |
| 306 &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, | 306 &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
| 307 base::Bind(&SessionManagerClientImpl::OnCheckArcAvailability, | 307 base::Bind(&SessionManagerClientImpl::OnCheckArcAvailability, |
| 308 weak_ptr_factory_.GetWeakPtr(), callback)); | 308 weak_ptr_factory_.GetWeakPtr(), callback)); |
| 309 } | 309 } |
| 310 | 310 |
| 311 void StartArcInstance(const cryptohome::Identification& cryptohome_id, | 311 void StartArcInstance(const cryptohome::Identification& cryptohome_id, |
| 312 bool disable_arc_boot_completed_broadcast, |
| 312 const ArcCallback& callback) override { | 313 const ArcCallback& callback) override { |
| 313 dbus::MethodCall method_call( | 314 dbus::MethodCall method_call( |
| 314 login_manager::kSessionManagerInterface, | 315 login_manager::kSessionManagerInterface, |
| 315 login_manager::kSessionManagerStartArcInstance); | 316 login_manager::kSessionManagerStartArcInstance); |
| 316 dbus::MessageWriter writer(&method_call); | 317 dbus::MessageWriter writer(&method_call); |
| 317 writer.AppendString(cryptohome_id.id()); | 318 writer.AppendString(cryptohome_id.id()); |
| 319 writer.AppendBool(disable_arc_boot_completed_broadcast); |
| 318 session_manager_proxy_->CallMethod( | 320 session_manager_proxy_->CallMethod( |
| 319 &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, | 321 &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
| 320 base::Bind(&SessionManagerClientImpl::OnArcMethod, | 322 base::Bind(&SessionManagerClientImpl::OnArcMethod, |
| 321 weak_ptr_factory_.GetWeakPtr(), | 323 weak_ptr_factory_.GetWeakPtr(), |
| 322 login_manager::kSessionManagerStartArcInstance, callback)); | 324 login_manager::kSessionManagerStartArcInstance, callback)); |
| 323 } | 325 } |
| 324 | 326 |
| 325 void StopArcInstance(const ArcCallback& callback) override { | 327 void StopArcInstance(const ArcCallback& callback) override { |
| 326 dbus::MethodCall method_call(login_manager::kSessionManagerInterface, | 328 dbus::MethodCall method_call(login_manager::kSessionManagerInterface, |
| 327 login_manager::kSessionManagerStopArcInstance); | 329 login_manager::kSessionManagerStopArcInstance); |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 | 890 |
| 889 if (!callback.is_null()) | 891 if (!callback.is_null()) |
| 890 callback.Run(state_keys); | 892 callback.Run(state_keys); |
| 891 } | 893 } |
| 892 | 894 |
| 893 void CheckArcAvailability(const ArcCallback& callback) override { | 895 void CheckArcAvailability(const ArcCallback& callback) override { |
| 894 callback.Run(false); | 896 callback.Run(false); |
| 895 } | 897 } |
| 896 | 898 |
| 897 void StartArcInstance(const cryptohome::Identification& cryptohome_id, | 899 void StartArcInstance(const cryptohome::Identification& cryptohome_id, |
| 900 bool disable_arc_boot_completed_broadcast, |
| 898 const ArcCallback& callback) override { | 901 const ArcCallback& callback) override { |
| 899 callback.Run(false); | 902 callback.Run(false); |
| 900 } | 903 } |
| 901 | 904 |
| 902 void PrioritizeArcInstance(const ArcCallback& callback) override { | 905 void PrioritizeArcInstance(const ArcCallback& callback) override { |
| 903 callback.Run(false); | 906 callback.Run(false); |
| 904 } | 907 } |
| 905 | 908 |
| 906 void EmitArcBooted() override {} | 909 void EmitArcBooted() override {} |
| 907 | 910 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 936 | 939 |
| 937 SessionManagerClient* SessionManagerClient::Create( | 940 SessionManagerClient* SessionManagerClient::Create( |
| 938 DBusClientImplementationType type) { | 941 DBusClientImplementationType type) { |
| 939 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) | 942 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) |
| 940 return new SessionManagerClientImpl(); | 943 return new SessionManagerClientImpl(); |
| 941 DCHECK_EQ(FAKE_DBUS_CLIENT_IMPLEMENTATION, type); | 944 DCHECK_EQ(FAKE_DBUS_CLIENT_IMPLEMENTATION, type); |
| 942 return new SessionManagerClientStubImpl(); | 945 return new SessionManagerClientStubImpl(); |
| 943 } | 946 } |
| 944 | 947 |
| 945 } // namespace chromeos | 948 } // namespace chromeos |
| OLD | NEW |