| 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/base_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 if (!WizardController::IsDeviceRegistered() && !users.empty()) { | 211 if (!WizardController::IsDeviceRegistered() && !users.empty()) { |
| 212 VLOG(1) << "Mark device registered because there are remembered users: " | 212 VLOG(1) << "Mark device registered because there are remembered users: " |
| 213 << users.size(); | 213 << users.size(); |
| 214 WizardController::MarkDeviceRegistered(); | 214 WizardController::MarkDeviceRegistered(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 sign_in_controller_.reset(); // Only one controller in a time. | 217 sign_in_controller_.reset(); // Only one controller in a time. |
| 218 sign_in_controller_.reset(new chromeos::ExistingUserController(this)); | 218 sign_in_controller_.reset(new chromeos::ExistingUserController(this)); |
| 219 oobe_progress_bar_visible_ = !WizardController::IsDeviceRegistered(); | 219 oobe_progress_bar_visible_ = !WizardController::IsDeviceRegistered(); |
| 220 SetOobeProgressBarVisible(oobe_progress_bar_visible_); | 220 SetOobeProgressBarVisible(oobe_progress_bar_visible_); |
| 221 SetStatusAreaVisible(true); |
| 221 SetShutdownButtonEnabled(true); | 222 SetShutdownButtonEnabled(true); |
| 222 sign_in_controller_->Init(users); | 223 sign_in_controller_->Init(users); |
| 223 | 224 |
| 224 // We might be here after a reboot that was triggered after OOBE was complete, | 225 // We might be here after a reboot that was triggered after OOBE was complete, |
| 225 // so check for auto-enrollment again. This might catch a cached decision from | 226 // so check for auto-enrollment again. This might catch a cached decision from |
| 226 // a previous oobe flow, or might start a new check with the server. | 227 // a previous oobe flow, or might start a new check with the server. |
| 227 CheckForAutoEnrollment(); | 228 CheckForAutoEnrollment(); |
| 228 | 229 |
| 229 // Initiate services customization manifest fetching. | 230 // Initiate services customization manifest fetching. |
| 230 ServicesCustomizationDocument::GetInstance()->StartFetching(); | 231 ServicesCustomizationDocument::GetInstance()->StartFetching(); |
| 231 | 232 |
| 232 // Initiate mobile config load. | 233 // Initiate mobile config load. |
| 233 MobileConfig::GetInstance(); | 234 MobileConfig::GetInstance(); |
| 234 | 235 |
| 235 // Initiate device policy fetching. | 236 // Initiate device policy fetching. |
| 236 g_browser_process->browser_policy_connector()->ScheduleServiceInitialization( | 237 g_browser_process->browser_policy_connector()->ScheduleServiceInitialization( |
| 237 kPolicyServiceInitializationDelayMilliseconds); | 238 kPolicyServiceInitializationDelayMilliseconds); |
| 238 } | 239 } |
| 239 | 240 |
| 240 void BaseLoginDisplayHost::ResumeSignInScreen() { | 241 void BaseLoginDisplayHost::ResumeSignInScreen() { |
| 241 // We only get here after a previous call the StartSignInScreen. That sign-in | 242 // We only get here after a previous call the StartSignInScreen. That sign-in |
| 242 // was successful but was interrupted by an auto-enrollment execution; once | 243 // was successful but was interrupted by an auto-enrollment execution; once |
| 243 // auto-enrollment is complete we resume the normal login flow from here. | 244 // auto-enrollment is complete we resume the normal login flow from here. |
| 244 DVLOG(1) << "Resuming sign in screen"; | 245 DVLOG(1) << "Resuming sign in screen"; |
| 245 CHECK(sign_in_controller_.get()); | 246 CHECK(sign_in_controller_.get()); |
| 246 SetOobeProgressBarVisible(oobe_progress_bar_visible_); | 247 SetOobeProgressBarVisible(oobe_progress_bar_visible_); |
| 248 SetStatusAreaVisible(true); |
| 247 SetShutdownButtonEnabled(true); | 249 SetShutdownButtonEnabled(true); |
| 248 sign_in_controller_->ResumeLogin(); | 250 sign_in_controller_->ResumeLogin(); |
| 249 } | 251 } |
| 250 | 252 |
| 251 void BaseLoginDisplayHost::CheckForAutoEnrollment() { | 253 void BaseLoginDisplayHost::CheckForAutoEnrollment() { |
| 252 // This method is called when the controller determines that the | 254 // This method is called when the controller determines that the |
| 253 // auto-enrollment check can start. This happens either after the EULA is | 255 // auto-enrollment check can start. This happens either after the EULA is |
| 254 // accepted, or right after a reboot if the EULA has already been accepted. | 256 // accepted, or right after a reboot if the EULA has already been accepted. |
| 255 | 257 |
| 256 if (policy::AutoEnrollmentClient::IsDisabled()) { | 258 if (policy::AutoEnrollmentClient::IsDisabled()) { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 VLOG(1) << "Initial time zone: " << timezone_name; | 567 VLOG(1) << "Initial time zone: " << timezone_name; |
| 566 // Apply locale customizations only once to preserve whatever locale | 568 // Apply locale customizations only once to preserve whatever locale |
| 567 // user has changed to during OOBE. | 569 // user has changed to during OOBE. |
| 568 if (!timezone_name.empty()) { | 570 if (!timezone_name.empty()) { |
| 569 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( | 571 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( |
| 570 UTF8ToUTF16(timezone_name)); | 572 UTF8ToUTF16(timezone_name)); |
| 571 } | 573 } |
| 572 } | 574 } |
| 573 | 575 |
| 574 } // namespace chromeos | 576 } // namespace chromeos |
| OLD | NEW |