| 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/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
| 16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 17 #include "base/stringprintf.h" | 17 #include "base/stringprintf.h" |
| 18 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
| 19 #include "base/values.h" | 19 #include "base/values.h" |
| 20 #include "base/version.h" | 20 #include "base/version.h" |
| 21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
| 22 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 22 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 23 #include "chrome/browser/chromeos/boot_times_loader.h" | 23 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 24 #include "chrome/browser/chromeos/cros/cros_library.h" | 24 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 25 #include "chrome/browser/chromeos/cros/network_library.h" | 25 #include "chrome/browser/chromeos/cros/network_library.h" |
| 26 #include "chrome/browser/chromeos/cros_settings.h" | 26 #include "chrome/browser/chromeos/cros_settings.h" |
| 27 #include "chrome/browser/chromeos/customization_document.h" | 27 #include "chrome/browser/chromeos/customization_document.h" |
| 28 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 28 #include "chrome/browser/chromeos/login/helper.h" | 29 #include "chrome/browser/chromeos/login/helper.h" |
| 29 #include "chrome/browser/chromeos/login/login_display_host.h" | 30 #include "chrome/browser/chromeos/login/login_display_host.h" |
| 30 #include "chrome/browser/chromeos/login/login_utils.h" | 31 #include "chrome/browser/chromeos/login/login_utils.h" |
| 31 #include "chrome/browser/chromeos/login/user_manager.h" | 32 #include "chrome/browser/chromeos/login/user_manager.h" |
| 32 #include "chrome/browser/chromeos/login/wizard_controller.h" | 33 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 33 #include "chrome/browser/chromeos/system/statistics_provider.h" | 34 #include "chrome/browser/chromeos/system/statistics_provider.h" |
| 34 #include "chrome/browser/google/google_util.h" | 35 #include "chrome/browser/google/google_util.h" |
| 35 #include "chrome/browser/policy/policy_service.h" | 36 #include "chrome/browser/policy/policy_service.h" |
| 36 #include "chrome/browser/prefs/pref_service.h" | 37 #include "chrome/browser/prefs/pref_service.h" |
| 37 #include "chrome/browser/prefs/session_startup_pref.h" | 38 #include "chrome/browser/prefs/session_startup_pref.h" |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 guide_url = chrome_common_net::AppendQueryParameter( | 777 guide_url = chrome_common_net::AppendQueryParameter( |
| 777 guide_url, | 778 guide_url, |
| 778 kGetStartedInitialLocaleParam, | 779 kGetStartedInitialLocaleParam, |
| 779 WizardController::GetInitialLocale()); | 780 WizardController::GetInitialLocale()); |
| 780 return guide_url.spec(); | 781 return guide_url.spec(); |
| 781 } | 782 } |
| 782 | 783 |
| 783 void ExistingUserController::OptionallyShowReleaseNotes( | 784 void ExistingUserController::OptionallyShowReleaseNotes( |
| 784 Profile* profile) const { | 785 Profile* profile) const { |
| 785 // TODO(nkostylev): Fix WizardControllerFlowTest case. | 786 // TODO(nkostylev): Fix WizardControllerFlowTest case. |
| 786 if (!profile) | 787 if (!profile || KioskModeSettings::Get()->IsKioskModeEnabled()) |
| 787 return; | 788 return; |
| 788 PrefService* prefs = profile->GetPrefs(); | 789 PrefService* prefs = profile->GetPrefs(); |
| 789 chrome::VersionInfo version_info; | 790 chrome::VersionInfo version_info; |
| 790 // New users would get this info with default getting started guide. | 791 // New users would get this info with default getting started guide. |
| 791 // In password changed case 2 options are available: | 792 // In password changed case 2 options are available: |
| 792 // 1. Cryptohome removed, pref is gone, not yet synced, recreate | 793 // 1. Cryptohome removed, pref is gone, not yet synced, recreate |
| 793 // with latest version. | 794 // with latest version. |
| 794 // 2. Cryptohome migrated, pref is available. To simplify implementation | 795 // 2. Cryptohome migrated, pref is available. To simplify implementation |
| 795 // update version here too. Unlikely that user signs in first time on | 796 // update version here too. Unlikely that user signs in first time on |
| 796 // the machine after update with password changed. | 797 // the machine after update with password changed. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 // Invalidate OAuth token, since it can't be correct after password is | 864 // Invalidate OAuth token, since it can't be correct after password is |
| 864 // changed. | 865 // changed. |
| 865 UserManager::Get()->SaveUserOAuthStatus(username, | 866 UserManager::Get()->SaveUserOAuthStatus(username, |
| 866 User::OAUTH_TOKEN_STATUS_INVALID); | 867 User::OAUTH_TOKEN_STATUS_INVALID); |
| 867 | 868 |
| 868 login_display_->SetUIEnabled(true); | 869 login_display_->SetUIEnabled(true); |
| 869 login_display_->ShowGaiaPasswordChanged(username); | 870 login_display_->ShowGaiaPasswordChanged(username); |
| 870 } | 871 } |
| 871 | 872 |
| 872 } // namespace chromeos | 873 } // namespace chromeos |
| OLD | NEW |