| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen.
h" | 5 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen.
h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 actor_->ShowDomainMismatchError(); | 241 actor_->ShowDomainMismatchError(); |
| 242 return; | 242 return; |
| 243 } | 243 } |
| 244 // Make sure the device policy subsystem is in a clean slate. | 244 // Make sure the device policy subsystem is in a clean slate. |
| 245 connector->ResetDevicePolicy(); | 245 connector->ResetDevicePolicy(); |
| 246 connector->ScheduleServiceInitialization(0); | 246 connector->ScheduleServiceInitialization(0); |
| 247 registrar_.reset(new policy::CloudPolicySubsystem::ObserverRegistrar( | 247 registrar_.reset(new policy::CloudPolicySubsystem::ObserverRegistrar( |
| 248 connector->device_cloud_policy_subsystem(), this)); | 248 connector->device_cloud_policy_subsystem(), this)); |
| 249 // Push the credentials to the policy infrastructure. It'll start enrollment | 249 // Push the credentials to the policy infrastructure. It'll start enrollment |
| 250 // and notify us of progress through CloudPolicySubsystem::Observer. | 250 // and notify us of progress through CloudPolicySubsystem::Observer. |
| 251 connector->RegisterForDevicePolicy(user_, token, is_auto_enrollment_); | 251 connector->RegisterForDevicePolicy(user_, token, |
| 252 is_auto_enrollment_, |
| 253 connector->IsEnterpriseManaged()); |
| 252 return; | 254 return; |
| 253 } | 255 } |
| 254 NOTREACHED(); | 256 NOTREACHED(); |
| 255 if (is_showing_) | 257 if (is_showing_) |
| 256 actor_->ShowFatalEnrollmentError(); | 258 actor_->ShowFatalEnrollmentError(); |
| 257 } | 259 } |
| 258 | 260 |
| 259 } // namespace chromeos | 261 } // namespace chromeos |
| OLD | NEW |