| 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/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 | 10 |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 SetStatusAreaVisible(false); | 309 SetStatusAreaVisible(false); |
| 310 SetCurrentScreen(GetNetworkScreen()); | 310 SetCurrentScreen(GetNetworkScreen()); |
| 311 } | 311 } |
| 312 | 312 |
| 313 void WizardController::ShowLoginScreen(const LoginScreenContext& context) { | 313 void WizardController::ShowLoginScreen(const LoginScreenContext& context) { |
| 314 if (!time_eula_accepted_.is_null()) { | 314 if (!time_eula_accepted_.is_null()) { |
| 315 base::TimeDelta delta = base::Time::Now() - time_eula_accepted_; | 315 base::TimeDelta delta = base::Time::Now() - time_eula_accepted_; |
| 316 UMA_HISTOGRAM_MEDIUM_TIMES("OOBE.EULAToSignInTime", delta); | 316 UMA_HISTOGRAM_MEDIUM_TIMES("OOBE.EULAToSignInTime", delta); |
| 317 } | 317 } |
| 318 VLOG(1) << "Showing login screen."; | 318 VLOG(1) << "Showing login screen."; |
| 319 // Restart fetch if previous attempt failed. |
| 320 ServicesCustomizationDocument::GetInstance()->StartFetching(); |
| 319 SetStatusAreaVisible(true); | 321 SetStatusAreaVisible(true); |
| 320 host_->StartSignInScreen(context); | 322 host_->StartSignInScreen(context); |
| 321 smooth_show_timer_.Stop(); | 323 smooth_show_timer_.Stop(); |
| 322 oobe_display_ = NULL; | 324 oobe_display_ = NULL; |
| 323 login_screen_started_ = true; | 325 login_screen_started_ = true; |
| 324 } | 326 } |
| 325 | 327 |
| 326 void WizardController::ResumeLoginScreen() { | 328 void WizardController::ResumeLoginScreen() { |
| 327 VLOG(1) << "Resuming login screen."; | 329 VLOG(1) << "Resuming login screen."; |
| 328 SetStatusAreaVisible(true); | 330 SetStatusAreaVisible(true); |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 void WizardController::StartTimezoneResolve() const { | 642 void WizardController::StartTimezoneResolve() const { |
| 641 LoginLocationMonitor::InstallLocationCallback( | 643 LoginLocationMonitor::InstallLocationCallback( |
| 642 base::TimeDelta::FromSeconds(kResolveTimeZoneTimeoutSeconds)); | 644 base::TimeDelta::FromSeconds(kResolveTimeZoneTimeoutSeconds)); |
| 643 } | 645 } |
| 644 | 646 |
| 645 void WizardController::PerformPostEulaActions() { | 647 void WizardController::PerformPostEulaActions() { |
| 646 DelayNetworkCall( | 648 DelayNetworkCall( |
| 647 base::Bind(&WizardController::StartTimezoneResolve, | 649 base::Bind(&WizardController::StartTimezoneResolve, |
| 648 weak_factory_.GetWeakPtr()), | 650 weak_factory_.GetWeakPtr()), |
| 649 base::TimeDelta::FromMilliseconds(kDefaultNetworkRetryDelayMS)); | 651 base::TimeDelta::FromMilliseconds(kDefaultNetworkRetryDelayMS)); |
| 652 ServicesCustomizationDocument::GetInstance()->StartFetching(); |
| 650 | 653 |
| 651 // Now that EULA has been accepted (for official builds), enable portal check. | 654 // Now that EULA has been accepted (for official builds), enable portal check. |
| 652 // ChromiumOS builds would go though this code path too. | 655 // ChromiumOS builds would go though this code path too. |
| 653 NetworkHandler::Get()->network_state_handler()->SetCheckPortalList( | 656 NetworkHandler::Get()->network_state_handler()->SetCheckPortalList( |
| 654 NetworkStateHandler::kDefaultCheckPortalList); | 657 NetworkStateHandler::kDefaultCheckPortalList); |
| 655 host_->CheckForAutoEnrollment(); | 658 host_->CheckForAutoEnrollment(); |
| 656 host_->PrewarmAuthentication(); | 659 host_->PrewarmAuthentication(); |
| 657 NetworkPortalDetector::Get()->Enable(true); | 660 NetworkPortalDetector::Get()->Enable(true); |
| 658 } | 661 } |
| 659 | 662 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1045 TimeZoneProvider* WizardController::GetTimezoneProvider() { | 1048 TimeZoneProvider* WizardController::GetTimezoneProvider() { |
| 1046 if (!timezone_provider_) { | 1049 if (!timezone_provider_) { |
| 1047 timezone_provider_.reset( | 1050 timezone_provider_.reset( |
| 1048 new TimeZoneProvider(g_browser_process->system_request_context(), | 1051 new TimeZoneProvider(g_browser_process->system_request_context(), |
| 1049 DefaultTimezoneProviderURL())); | 1052 DefaultTimezoneProviderURL())); |
| 1050 } | 1053 } |
| 1051 return timezone_provider_.get(); | 1054 return timezone_provider_.get(); |
| 1052 } | 1055 } |
| 1053 | 1056 |
| 1054 } // namespace chromeos | 1057 } // namespace chromeos |
| OLD | NEW |