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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 void WizardController::ShowUserImageScreen() { | 446 void WizardController::ShowUserImageScreen() { |
447 const chromeos::UserManager* user_manager = chromeos::UserManager::Get(); | 447 const chromeos::UserManager* user_manager = chromeos::UserManager::Get(); |
448 // Skip user image selection for public sessions and ephemeral logins. | 448 // Skip user image selection for public sessions and ephemeral logins. |
449 if (user_manager->IsLoggedInAsPublicAccount() || | 449 if (user_manager->IsLoggedInAsPublicAccount() || |
450 user_manager->IsCurrentUserNonCryptohomeDataEphemeral()) { | 450 user_manager->IsCurrentUserNonCryptohomeDataEphemeral()) { |
451 OnUserImageSkipped(); | 451 OnUserImageSkipped(); |
452 return; | 452 return; |
453 } | 453 } |
454 VLOG(1) << "Showing user image screen."; | 454 VLOG(1) << "Showing user image screen."; |
455 | 455 |
456 bool profile_picture_enabled = true; | |
457 std::string user_id; | |
458 if (screen_parameters_.get()) { | |
459 screen_parameters_->GetBoolean("profile_picture_enabled", | |
460 &profile_picture_enabled); | |
461 screen_parameters_->GetString("user_id", &user_id); | |
462 } | |
463 | |
464 // Status area has been already shown at sign in screen so it | 456 // Status area has been already shown at sign in screen so it |
465 // doesn't make sense to hide it here and then show again at user session as | 457 // doesn't make sense to hide it here and then show again at user session as |
466 // this produces undesired UX transitions. | 458 // this produces undesired UX transitions. |
467 SetStatusAreaVisible(true); | 459 SetStatusAreaVisible(true); |
468 | 460 |
469 UserImageScreen* screen = GetUserImageScreen(); | 461 SetCurrentScreen(GetUserImageScreen()); |
470 if (!user_id.empty()) | |
471 screen->SetUserID(user_id); | |
472 screen->SetProfilePictureEnabled(profile_picture_enabled); | |
473 | |
474 SetCurrentScreen(screen); | |
475 } | 462 } |
476 | 463 |
477 void WizardController::ShowEulaScreen() { | 464 void WizardController::ShowEulaScreen() { |
478 VLOG(1) << "Showing EULA screen."; | 465 VLOG(1) << "Showing EULA screen."; |
479 SetStatusAreaVisible(true); | 466 SetStatusAreaVisible(true); |
480 SetCurrentScreen(GetEulaScreen()); | 467 SetCurrentScreen(GetEulaScreen()); |
481 } | 468 } |
482 | 469 |
483 void WizardController::ShowEnrollmentScreen() { | 470 void WizardController::ShowEnrollmentScreen() { |
484 VLOG(1) << "Showing enrollment screen."; | 471 VLOG(1) << "Showing enrollment screen."; |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 bool WizardController::SetOnTimeZoneResolvedForTesting( | 1275 bool WizardController::SetOnTimeZoneResolvedForTesting( |
1289 const base::Closure& callback) { | 1276 const base::Closure& callback) { |
1290 if (timezone_resolved_) | 1277 if (timezone_resolved_) |
1291 return false; | 1278 return false; |
1292 | 1279 |
1293 on_timezone_resolved_for_testing_ = callback; | 1280 on_timezone_resolved_for_testing_ = callback; |
1294 return true; | 1281 return true; |
1295 } | 1282 } |
1296 | 1283 |
1297 } // namespace chromeos | 1284 } // namespace chromeos |
OLD | NEW |