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" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "chrome/browser/chromeos/login/wizard_controller.h" | 34 #include "chrome/browser/chromeos/login/wizard_controller.h" |
35 #include "chrome/browser/chromeos/net/connectivity_state_helper.h" | 35 #include "chrome/browser/chromeos/net/connectivity_state_helper.h" |
36 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 36 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
37 #include "chrome/browser/chromeos/settings/cros_settings.h" | 37 #include "chrome/browser/chromeos/settings/cros_settings.h" |
38 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 38 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
39 #include "chrome/browser/chromeos/system/statistics_provider.h" | 39 #include "chrome/browser/chromeos/system/statistics_provider.h" |
40 #include "chrome/browser/google/google_util.h" | 40 #include "chrome/browser/google/google_util.h" |
41 #include "chrome/browser/policy/policy_service.h" | 41 #include "chrome/browser/policy/policy_service.h" |
42 #include "chrome/browser/prefs/session_startup_pref.h" | 42 #include "chrome/browser/prefs/session_startup_pref.h" |
43 #include "chrome/common/chrome_notification_types.h" | 43 #include "chrome/common/chrome_notification_types.h" |
44 #include "chrome/common/chrome_switches.h" | |
45 #include "chrome/common/chrome_version_info.h" | 44 #include "chrome/common/chrome_version_info.h" |
46 #include "chrome/common/pref_names.h" | 45 #include "chrome/common/pref_names.h" |
47 #include "chrome/common/url_constants.h" | 46 #include "chrome/common/url_constants.h" |
| 47 #include "chromeos/chromeos_switches.h" |
48 #include "chromeos/dbus/dbus_thread_manager.h" | 48 #include "chromeos/dbus/dbus_thread_manager.h" |
49 #include "chromeos/dbus/power_manager_client.h" | 49 #include "chromeos/dbus/power_manager_client.h" |
50 #include "chromeos/dbus/session_manager_client.h" | 50 #include "chromeos/dbus/session_manager_client.h" |
51 #include "content/public/browser/browser_thread.h" | 51 #include "content/public/browser/browser_thread.h" |
52 #include "content/public/browser/notification_service.h" | 52 #include "content/public/browser/notification_service.h" |
53 #include "content/public/browser/notification_types.h" | 53 #include "content/public/browser/notification_types.h" |
54 #include "content/public/browser/user_metrics.h" | 54 #include "content/public/browser/user_metrics.h" |
55 #include "google_apis/gaia/gaia_auth_util.h" | 55 #include "google_apis/gaia/gaia_auth_util.h" |
56 #include "google_apis/gaia/google_service_auth_error.h" | 56 #include "google_apis/gaia/google_service_auth_error.h" |
57 #include "grit/generated_resources.h" | 57 #include "grit/generated_resources.h" |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 | 769 |
770 if (UserManager::Get()->IsCurrentUserNew() && | 770 if (UserManager::Get()->IsCurrentUserNew() && |
771 !UserManager::Get()->GetCurrentUserFlow()->ShouldSkipPostLoginScreens() && | 771 !UserManager::Get()->GetCurrentUserFlow()->ShouldSkipPostLoginScreens() && |
772 !WizardController::default_controller()->skip_post_login_screens()) { | 772 !WizardController::default_controller()->skip_post_login_screens()) { |
773 // Don't specify start URLs if the administrator has configured the start | 773 // Don't specify start URLs if the administrator has configured the start |
774 // URLs via policy. | 774 // URLs via policy. |
775 if (!SessionStartupPref::TypeIsManaged(profile->GetPrefs())) | 775 if (!SessionStartupPref::TypeIsManaged(profile->GetPrefs())) |
776 InitializeStartUrls(); | 776 InitializeStartUrls(); |
777 #ifndef NDEBUG | 777 #ifndef NDEBUG |
778 if (CommandLine::ForCurrentProcess()->HasSwitch( | 778 if (CommandLine::ForCurrentProcess()->HasSwitch( |
779 switches::kOobeSkipPostLogin)) { | 779 chromeos::switches::kOobeSkipPostLogin)) { |
780 LoginUtils::Get()->DoBrowserLaunch(profile, host_); | 780 LoginUtils::Get()->DoBrowserLaunch(profile, host_); |
781 host_ = NULL; | 781 host_ = NULL; |
782 } else { | 782 } else { |
783 #endif | 783 #endif |
784 // Mark the device as registered., i.e. the second part of OOBE as | 784 // Mark the device as registered., i.e. the second part of OOBE as |
785 // completed. | 785 // completed. |
786 if (!StartupUtils::IsDeviceRegistered()) | 786 if (!StartupUtils::IsDeviceRegistered()) |
787 StartupUtils::MarkDeviceRegistered(); | 787 StartupUtils::MarkDeviceRegistered(); |
788 | 788 |
789 ActivateWizard(WizardController::kTermsOfServiceScreenName); | 789 ActivateWizard(WizardController::kTermsOfServiceScreenName); |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 // changed. | 1085 // changed. |
1086 UserManager::Get()->SaveUserOAuthStatus( | 1086 UserManager::Get()->SaveUserOAuthStatus( |
1087 username, | 1087 username, |
1088 User::OAUTH2_TOKEN_STATUS_INVALID); | 1088 User::OAUTH2_TOKEN_STATUS_INVALID); |
1089 | 1089 |
1090 login_display_->SetUIEnabled(true); | 1090 login_display_->SetUIEnabled(true); |
1091 login_display_->ShowGaiaPasswordChanged(username); | 1091 login_display_->ShowGaiaPasswordChanged(username); |
1092 } | 1092 } |
1093 | 1093 |
1094 } // namespace chromeos | 1094 } // namespace chromeos |
OLD | NEW |