Index: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc |
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc |
index 126e2c34c89ae9eb6c8ffdc00e3cbfb59d8f20ca..d23c1746ff1df3ea9d528710f5c23e4ace804db6 100644 |
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc |
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc |
@@ -40,6 +40,7 @@ |
#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
#include "chrome/browser/chromeos/login/wizard_controller.h" |
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
+#include "chrome/browser/chromeos/policy/consumer_management_service.h" |
#include "chrome/browser/chromeos/policy/device_local_account.h" |
#include "chrome/browser/chromeos/profiles/profile_helper.h" |
#include "chrome/browser/chromeos/settings/cros_settings.h" |
@@ -300,11 +301,12 @@ SigninScreenHandler::SigninScreenHandler( |
keyboard->AddObserver(this); |
CommandLine* command_line = CommandLine::ForCurrentProcess(); |
- PrefService* prefs = g_browser_process->local_state(); |
+ policy::BrowserPolicyConnectorChromeOS* connector = |
+ g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
is_enrolling_consumer_management_ = |
command_line->HasSwitch(chromeos::switches::kEnableConsumerManagement) && |
- prefs->GetBoolean(prefs::kConsumerManagementEnrollmentRequested); |
- |
+ connector->GetConsumerManagementService()->GetEnrollState() == |
bartfab (slow)
2014/08/04 18:44:56
Nit: Indent two more spaces.
davidyu
2014/08/05 07:27:00
Done.
|
+ policy::ConsumerManagementService::ENROLL_ENROLLING; |
bartfab (slow)
2014/08/04 18:44:56
Nit: Indent two more spaces.
davidyu
2014/08/05 07:27:01
Done.
|
} |
SigninScreenHandler::~SigninScreenHandler() { |
@@ -1345,8 +1347,10 @@ void SigninScreenHandler::HandleLaunchKioskApp(const std::string& app_id, |
} |
void SigninScreenHandler::HandleCancelConsumerManagementEnrollment() { |
- PrefService* prefs = g_browser_process->local_state(); |
- prefs->SetBoolean(prefs::kConsumerManagementEnrollmentRequested, false); |
+ policy::BrowserPolicyConnectorChromeOS* connector = |
+ g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
+ connector->GetConsumerManagementService()->SetEnrollState( |
+ policy::ConsumerManagementService::ENROLL_CANCELED); |
is_enrolling_consumer_management_ = false; |
ShowImpl(); |
} |