| 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/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
| 17 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
| 18 #include "base/values.h" | 18 #include "base/values.h" |
| 19 #include "base/version.h" | 19 #include "base/version.h" |
| 20 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| 21 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 21 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 22 #include "chrome/browser/chromeos/boot_times_loader.h" | 22 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 23 #include "chrome/browser/chromeos/cros/cros_library.h" | 23 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 24 #include "chrome/browser/chromeos/cros/network_library.h" | 24 #include "chrome/browser/chromeos/cros/network_library.h" |
| 25 #include "chrome/browser/chromeos/cros_settings.h" | 25 #include "chrome/browser/chromeos/cros_settings.h" |
| 26 #include "chrome/browser/chromeos/customization_document.h" | 26 #include "chrome/browser/chromeos/customization_document.h" |
| 27 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 27 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 28 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 28 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
| 29 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 29 #include "chrome/browser/chromeos/login/helper.h" | 30 #include "chrome/browser/chromeos/login/helper.h" |
| 30 #include "chrome/browser/chromeos/login/login_display_host.h" | 31 #include "chrome/browser/chromeos/login/login_display_host.h" |
| 31 #include "chrome/browser/chromeos/login/login_utils.h" | 32 #include "chrome/browser/chromeos/login/login_utils.h" |
| 32 #include "chrome/browser/chromeos/login/user_manager.h" | 33 #include "chrome/browser/chromeos/login/user_manager.h" |
| 33 #include "chrome/browser/chromeos/login/wizard_controller.h" | 34 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 34 #include "chrome/browser/chromeos/system/statistics_provider.h" | 35 #include "chrome/browser/chromeos/system/statistics_provider.h" |
| 35 #include "chrome/browser/google/google_util.h" | 36 #include "chrome/browser/google/google_util.h" |
| 36 #include "chrome/browser/net/browser_url_util.h" | 37 #include "chrome/browser/net/browser_url_util.h" |
| 37 #include "chrome/browser/policy/browser_policy_connector.h" | 38 #include "chrome/browser/policy/browser_policy_connector.h" |
| 38 #include "chrome/browser/prefs/pref_service.h" | 39 #include "chrome/browser/prefs/pref_service.h" |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 std::string guide_url = base::StringPrintf(url, current_locale.c_str()); | 799 std::string guide_url = base::StringPrintf(url, current_locale.c_str()); |
| 799 if (is_owner_login_) | 800 if (is_owner_login_) |
| 800 guide_url.append(kGetStartedOwnerParam); | 801 guide_url.append(kGetStartedOwnerParam); |
| 801 return guide_url; | 802 return guide_url; |
| 802 } | 803 } |
| 803 #endif | 804 #endif |
| 804 | 805 |
| 805 void ExistingUserController::OptionallyShowReleaseNotes( | 806 void ExistingUserController::OptionallyShowReleaseNotes( |
| 806 Profile* profile) const { | 807 Profile* profile) const { |
| 807 // TODO(nkostylev): Fix WizardControllerFlowTest case. | 808 // TODO(nkostylev): Fix WizardControllerFlowTest case. |
| 808 if (!profile) | 809 if (!profile || KioskModeSettings::Get()->IsKioskModeEnabled()) |
| 809 return; | 810 return; |
| 810 PrefService* prefs = profile->GetPrefs(); | 811 PrefService* prefs = profile->GetPrefs(); |
| 811 chrome::VersionInfo version_info; | 812 chrome::VersionInfo version_info; |
| 812 // New users would get this info with default getting started guide. | 813 // New users would get this info with default getting started guide. |
| 813 // In password changed case 2 options are available: | 814 // In password changed case 2 options are available: |
| 814 // 1. Cryptohome removed, pref is gone, not yet synced, recreate | 815 // 1. Cryptohome removed, pref is gone, not yet synced, recreate |
| 815 // with latest version. | 816 // with latest version. |
| 816 // 2. Cryptohome migrated, pref is available. To simplify implementation | 817 // 2. Cryptohome migrated, pref is available. To simplify implementation |
| 817 // update version here too. Unlikely that user signs in first time on | 818 // update version here too. Unlikely that user signs in first time on |
| 818 // the machine after update with password changed. | 819 // the machine after update with password changed. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 // changed. | 884 // changed. |
| 884 UserManager::Get()->SaveUserOAuthStatus(username, | 885 UserManager::Get()->SaveUserOAuthStatus(username, |
| 885 User::OAUTH_TOKEN_STATUS_INVALID); | 886 User::OAUTH_TOKEN_STATUS_INVALID); |
| 886 | 887 |
| 887 login_display_->SetUIEnabled(true); | 888 login_display_->SetUIEnabled(true); |
| 888 SetStatusAreaEnabled(true); | 889 SetStatusAreaEnabled(true); |
| 889 login_display_->ShowGaiaPasswordChanged(username); | 890 login_display_->ShowGaiaPasswordChanged(username); |
| 890 } | 891 } |
| 891 | 892 |
| 892 } // namespace chromeos | 893 } // namespace chromeos |
| OLD | NEW |