diff options
Diffstat (limited to 'chromeos')
| -rw-r--r-- | chromeos/dbus/fake_session_manager_client.cc | 16 | ||||
| -rw-r--r-- | chromeos/dbus/fake_session_manager_client.h | 4 |
2 files changed, 12 insertions, 8 deletions
diff --git a/chromeos/dbus/fake_session_manager_client.cc b/chromeos/dbus/fake_session_manager_client.cc index e66b15b..58ffcd7 100644 --- a/chromeos/dbus/fake_session_manager_client.cc +++ b/chromeos/dbus/fake_session_manager_client.cc @@ -16,8 +16,8 @@ namespace chromeos { FakeSessionManagerClient::FakeSessionManagerClient() : start_device_wipe_call_count_(0), notify_lock_screen_shown_call_count_(0), - notify_lock_screen_dismissed_call_count_(0) { -} + notify_lock_screen_dismissed_call_count_(0), + arc_available_(false) {} FakeSessionManagerClient::~FakeSessionManagerClient() { } @@ -153,19 +153,19 @@ void FakeSessionManagerClient::GetServerBackedStateKeys( void FakeSessionManagerClient::CheckArcAvailability( const ArcCallback& callback) { - base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, - base::Bind(callback, false)); + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::Bind(callback, arc_available_)); } void FakeSessionManagerClient::StartArcInstance(const std::string& socket_path, const ArcCallback& callback) { - base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, - base::Bind(callback, false)); + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::Bind(callback, arc_available_)); } void FakeSessionManagerClient::StopArcInstance(const ArcCallback& callback) { - base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, - base::Bind(callback, false)); + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::Bind(callback, arc_available_)); } const std::string& FakeSessionManagerClient::device_policy() const { diff --git a/chromeos/dbus/fake_session_manager_client.h b/chromeos/dbus/fake_session_manager_client.h index 4150091..e5b594a 100644 --- a/chromeos/dbus/fake_session_manager_client.h +++ b/chromeos/dbus/fake_session_manager_client.h @@ -105,6 +105,8 @@ class FakeSessionManagerClient : public SessionManagerClient { return notify_lock_screen_dismissed_call_count_; } + void set_arc_available(bool available) { arc_available_ = available; } + private: std::string device_policy_; std::map<cryptohome::Identification, std::string> user_policies_; @@ -117,6 +119,8 @@ class FakeSessionManagerClient : public SessionManagerClient { int notify_lock_screen_shown_call_count_; int notify_lock_screen_dismissed_call_count_; + bool arc_available_; + DISALLOW_COPY_AND_ASSIGN(FakeSessionManagerClient); }; |
