Implemented consumer management unenrollment.
commit051ed4f27b9361534e25311ad1987f30335faa16
authordavidyu <davidyu@chromium.org>
Thu, 15 Jan 2015 07:32:31 +0000 (14 23:32 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 15 Jan 2015 07:33:25 +0000 (15 07:33 +0000)
treeb216b4ce9136065ce12e7ecaa91f0bbcbc867138
parent39ad0033b4c45275e933bb02672fb6898ef3f291
Implemented consumer management unenrollment.

To implement this feature:
  - Added ConsumerUnenrollmentHandler and ConsumerUnenrollmentHandlerFactory.
  - Added DevcieCloudPolicyManagerChromeOS::Unregister() and Disconnect().
  - Added CloudPolicyService::Unregister().
  - Added unenrollment related stages in ConsumerManagementStage.
  - Extended ConsumerManagementNotification to show unenroll notifications.

Also, the device cloud policy initializer is restarted after the unenrollment
so that we can implement reboot-free enrollment in the future. To implement
this feature:
  - Added OnDeviceCloudPolicyManagerDisconnected().
  - Added BrowserPolicyConnectChromeOS::RestartDeviceCloudPolicyInitializer()
  - Fixed the initiailzer so that it uses ConsumerManagementService to check if
    the device is consumer-managed rather using DeviceCloudPolicyStore, which
    doesn't load policies for consumer-managed devices.

BUG=chromium:353050
TEST=unit_tests

Review URL: https://codereview.chromium.org/751703003

Cr-Commit-Position: refs/heads/master@{#311643}
28 files changed:
chrome/app/chromeos_strings.grdp
chrome/browser/chromeos/ownership/fake_owner_settings_service.cc [new file with mode: 0644]
chrome/browser/chromeos/ownership/fake_owner_settings_service.h [new file with mode: 0644]
chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc
chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h
chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h
chrome/browser/chromeos/policy/consumer_management_notifier.cc
chrome/browser/chromeos/policy/consumer_management_notifier.h
chrome/browser/chromeos/policy/consumer_management_notifier_unittest.cc
chrome/browser/chromeos/policy/consumer_management_service_unittest.cc
chrome/browser/chromeos/policy/consumer_unenrollment_handler.cc [new file with mode: 0644]
chrome/browser/chromeos/policy/consumer_unenrollment_handler.h [new file with mode: 0644]
chrome/browser/chromeos/policy/consumer_unenrollment_handler_factory.cc [new file with mode: 0644]
chrome/browser/chromeos/policy/consumer_unenrollment_handler_factory.h [new file with mode: 0644]
chrome/browser/chromeos/policy/consumer_unenrollment_handler_unittest.cc [new file with mode: 0644]
chrome/browser/chromeos/policy/device_cloud_policy_browsertest.cc
chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc
chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h
chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc
chrome/browser/chromeos/policy/fake_device_cloud_policy_manager.cc [new file with mode: 0644]
chrome/browser/chromeos/policy/fake_device_cloud_policy_manager.h [new file with mode: 0644]
chrome/browser/ui/webui/options/chromeos/consumer_management_handler.cc
chrome/chrome_browser_chromeos.gypi
chrome/chrome_tests_unit.gypi
components/policy/core/common/cloud/cloud_policy_service.cc
components/policy/core/common/cloud/cloud_policy_service.h
components/policy/core/common/cloud/cloud_policy_service_unittest.cc