diff options
| author | nya <nya@chromium.org> | 2016-03-23 03:12:33 -0700 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2016-03-23 10:13:46 +0000 |
| commit | 1b5973d3a7a70a3446502035ef5431c7fda56518 (patch) | |
| tree | 71ffc3e755a02b918d1d0382c96a04a88e1d7356 /chrome/browser/policy | |
| parent | 26d91d2108a891ad9e0cfed8d15fbb312381fda1 (diff) | |
| download | chromium_src-1b5973d3a7a70a3446502035ef5431c7fda56518.zip chromium_src-1b5973d3a7a70a3446502035ef5431c7fda56518.tar.gz chromium_src-1b5973d3a7a70a3446502035ef5431c7fda56518.tar.bz2 | |
Revert of Add ArcEnabled policy implementation
Reason for revert:
This change broke --disable-arc-opt-in-verification used for
autotests.
> 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}
TBR=pbond@chromium.org,bartfab@chromium.org,jochen@chromium.org,dbeam@chromium.org,tnagel@chromium.org,hidehiko@chromium.org,hashimoto@chromium.org
BUG=582440
Review URL: https://codereview.chromium.org/1825143003
Cr-Commit-Position: refs/heads/master@{#382819}
Diffstat (limited to 'chrome/browser/policy')
| -rw-r--r-- | chrome/browser/policy/DEPS | 1 | ||||
| -rw-r--r-- | chrome/browser/policy/configuration_policy_handler_list_factory.cc | 3 | ||||
| -rw-r--r-- | chrome/browser/policy/policy_browsertest.cc | 92 |
3 files changed, 0 insertions, 96 deletions
diff --git a/chrome/browser/policy/DEPS b/chrome/browser/policy/DEPS index 382e9d0..468cb59 100644 --- a/chrome/browser/policy/DEPS +++ b/chrome/browser/policy/DEPS @@ -1,7 +1,6 @@ include_rules = [ "+chrome", "+chromeos", - "+components/arc/test", "+components/drive/drive_pref_names.h", "+components/user_manager", "+content/public/browser", diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc index ba007c9..5ee927f 100644 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc @@ -502,9 +502,6 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { { key::kUnifiedDesktopEnabledByDefault, prefs::kUnifiedDesktopEnabledByDefault, base::Value::TYPE_BOOLEAN }, - { key::kArcEnabled, - prefs::kArcEnabled, - base::Value::TYPE_BOOLEAN }, #endif // defined(OS_CHROMEOS) // Metrics reporting is controlled by a platform specific policy for ChromeOS diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index be00c54..eb72c63 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc @@ -191,20 +191,9 @@ #include "ash/shell.h" #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" #include "chrome/browser/chromeos/accessibility/magnification_manager.h" -#include "chrome/browser/chromeos/arc/arc_auth_service.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" -#include "chrome/browser/ui/ash/multi_user/multi_user_util.h" #include "chromeos/audio/cras_audio_handler.h" -#include "chromeos/chromeos_switches.h" -#include "chromeos/dbus/dbus_thread_manager.h" -#include "chromeos/dbus/fake_session_manager_client.h" -#include "chromeos/dbus/session_manager_client.h" -#include "components/arc/arc_bridge_service.h" -#include "components/arc/arc_bridge_service_impl.h" -#include "components/arc/arc_service_manager.h" -#include "components/arc/test/fake_arc_bridge_bootstrap.h" -#include "components/arc/test/fake_arc_bridge_instance.h" #include "ui/chromeos/accessibility_types.h" #include "ui/keyboard/keyboard_util.h" #include "ui/snapshot/screenshot_grabber.h" @@ -4002,87 +3991,6 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, UnifiedDesktopEnabledByDefault) { UpdateProviderPolicy(policies); EXPECT_FALSE(display_manager->unified_desktop_enabled()); } - -class ArcPolicyTest : public PolicyTest { - public: - ArcPolicyTest() {} - ~ArcPolicyTest() override {} - - protected: - void SetUpTest() { - base::CommandLine::ForCurrentProcess()->AppendSwitch( - chromeos::switches::kDisableArcOptInVerification); - arc::ArcAuthService::DisableUIForTesting(); - - arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared( - multi_user_util::GetAccountIdFromProfile(browser()->profile())); - arc::ArcAuthService::Get()->OnPrimaryUserProfilePrepared( - browser()->profile()); - } - - void TearDownTest() { - arc::ArcAuthService::Get()->Shutdown(); - } - - void SetUpInProcessBrowserTestFixture() override { - PolicyTest::SetUpInProcessBrowserTestFixture(); - fake_session_manager_client_ = new chromeos::FakeSessionManagerClient; - fake_session_manager_client_->set_arc_available(true); - chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( - scoped_ptr<chromeos::SessionManagerClient>( - fake_session_manager_client_)); - - fake_arc_bridge_instance_.reset(new arc::FakeArcBridgeInstance); - arc::ArcServiceManager::SetArcBridgeServiceForTesting(make_scoped_ptr( - new arc::ArcBridgeServiceImpl(make_scoped_ptr( - new arc::FakeArcBridgeBootstrap( - fake_arc_bridge_instance_.get()))))); - } - - private: - chromeos::FakeSessionManagerClient *fake_session_manager_client_; - scoped_ptr<arc::FakeArcBridgeInstance> fake_arc_bridge_instance_; - - DISALLOW_COPY_AND_ASSIGN(ArcPolicyTest); -}; - -// Test ArcEnabled policy. -IN_PROC_BROWSER_TEST_F(ArcPolicyTest, ArcEnabled) { - SetUpTest(); - - const PrefService* const pref = browser()->profile()->GetPrefs(); - const arc::ArcBridgeService* const arc_bridge_service - = arc::ArcBridgeService::Get(); - - // ARC is switched off by default. - EXPECT_EQ(arc::ArcBridgeService::State::STOPPED, arc_bridge_service->state()); - EXPECT_FALSE(pref->GetBoolean(prefs::kArcEnabled)); - - // Enable ARC. - PolicyMap policies; - policies.Set(key::kArcEnabled, - POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, - POLICY_SOURCE_CLOUD, - new base::FundamentalValue(true), - nullptr); - UpdateProviderPolicy(policies); - EXPECT_TRUE(pref->GetBoolean(prefs::kArcEnabled)); - EXPECT_EQ(arc::ArcBridgeService::State::READY, arc_bridge_service->state()); - - // Disable ARC. - policies.Set(key::kArcEnabled, - POLICY_LEVEL_MANDATORY, - POLICY_SCOPE_USER, - POLICY_SOURCE_CLOUD, - new base::FundamentalValue(false), - nullptr); - UpdateProviderPolicy(policies); - EXPECT_FALSE(pref->GetBoolean(prefs::kArcEnabled)); - EXPECT_EQ(arc::ArcBridgeService::State::STOPPED, arc_bridge_service->state()); - - TearDownTest(); -} #endif // defined(OS_CHROMEOS) } // namespace policy |
