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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 VLOG(1) << "Showing network screen."; | 412 VLOG(1) << "Showing network screen."; |
413 // Hide the status area initially; it only appears after OOBE first animates | 413 // Hide the status area initially; it only appears after OOBE first animates |
414 // in. Keep it visible if the user goes back to the existing network screen. | 414 // in. Keep it visible if the user goes back to the existing network screen. |
415 SetStatusAreaVisible(HasScreen(kNetworkScreenName)); | 415 SetStatusAreaVisible(HasScreen(kNetworkScreenName)); |
416 SetCurrentScreen(GetScreen(kNetworkScreenName)); | 416 SetCurrentScreen(GetScreen(kNetworkScreenName)); |
417 | 417 |
418 MaybeStartListeningForSharkConnection(); | 418 MaybeStartListeningForSharkConnection(); |
419 } | 419 } |
420 | 420 |
421 void WizardController::ShowLoginScreen(const LoginScreenContext& context) { | 421 void WizardController::ShowLoginScreen(const LoginScreenContext& context) { |
| 422 // This may be triggered by multiply asynchronous events from the JS side. |
| 423 if (login_screen_started_) |
| 424 return; |
| 425 |
422 if (!time_eula_accepted_.is_null()) { | 426 if (!time_eula_accepted_.is_null()) { |
423 base::TimeDelta delta = base::Time::Now() - time_eula_accepted_; | 427 base::TimeDelta delta = base::Time::Now() - time_eula_accepted_; |
424 UMA_HISTOGRAM_MEDIUM_TIMES("OOBE.EULAToSignInTime", delta); | 428 UMA_HISTOGRAM_MEDIUM_TIMES("OOBE.EULAToSignInTime", delta); |
425 } | 429 } |
426 VLOG(1) << "Showing login screen."; | 430 VLOG(1) << "Showing login screen."; |
427 SetStatusAreaVisible(true); | 431 SetStatusAreaVisible(true); |
428 host_->StartSignInScreen(context); | 432 host_->StartSignInScreen(context); |
429 smooth_show_timer_.Stop(); | 433 smooth_show_timer_.Stop(); |
430 oobe_ui_ = nullptr; | 434 oobe_ui_ = nullptr; |
431 login_screen_started_ = true; | 435 login_screen_started_ = true; |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; | 1421 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; |
1418 } | 1422 } |
1419 | 1423 |
1420 EnrollmentScreen* screen = EnrollmentScreen::Get(this); | 1424 EnrollmentScreen* screen = EnrollmentScreen::Get(this); |
1421 screen->SetParameters(effective_config, shark_controller_.get()); | 1425 screen->SetParameters(effective_config, shark_controller_.get()); |
1422 SetStatusAreaVisible(true); | 1426 SetStatusAreaVisible(true); |
1423 SetCurrentScreen(screen); | 1427 SetCurrentScreen(screen); |
1424 } | 1428 } |
1425 | 1429 |
1426 } // namespace chromeos | 1430 } // namespace chromeos |
OLD | NEW |