summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authorpbond <pbond@chromium.org>2016-03-21 03:57:03 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-21 10:58:24 +0000
commit33cc17d626fd54020cacc43e1cf2c08298ae8d52 (patch)
treed8c3c58db51276843056424f522df8cc2d6a6748 /chromeos
parentadc7b8b7f37f3135c0e5c464680f6e0bb98dfc1c (diff)
downloadchromium_src-33cc17d626fd54020cacc43e1cf2c08298ae8d52.zip
chromium_src-33cc17d626fd54020cacc43e1cf2c08298ae8d52.tar.gz
chromium_src-33cc17d626fd54020cacc43e1cf2c08298ae8d52.tar.bz2
Add ArcEnabled policy implementation
Hide "ARC OptIn" control from Chrome:Settings for enterprise users, map ArcEnabled policy to ArcEnabled pref. BUG=582440 Review URL: https://codereview.chromium.org/1684063002 Cr-Commit-Position: refs/heads/master@{#382266}
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/dbus/fake_session_manager_client.cc16
-rw-r--r--chromeos/dbus/fake_session_manager_client.h4
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);
};