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 14 matching lines...) Expand all Loading... |
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/login/helper.h" | 28 #include "chrome/browser/chromeos/login/helper.h" |
29 #include "chrome/browser/chromeos/login/login_display_host.h" | 29 #include "chrome/browser/chromeos/login/login_display_host.h" |
30 #include "chrome/browser/chromeos/login/login_utils.h" | 30 #include "chrome/browser/chromeos/login/login_utils.h" |
31 #include "chrome/browser/chromeos/login/user_manager.h" | 31 #include "chrome/browser/chromeos/login/user_manager.h" |
32 #include "chrome/browser/chromeos/login/wizard_controller.h" | 32 #include "chrome/browser/chromeos/login/wizard_controller.h" |
33 #include "chrome/browser/chromeos/system/statistics_provider.h" | 33 #include "chrome/browser/chromeos/system/statistics_provider.h" |
34 #include "chrome/browser/google/google_util.h" | 34 #include "chrome/browser/google/google_util.h" |
35 #include "chrome/browser/net/browser_url_util.h" | |
36 #include "chrome/browser/policy/policy_service.h" | 35 #include "chrome/browser/policy/policy_service.h" |
37 #include "chrome/browser/prefs/pref_service.h" | 36 #include "chrome/browser/prefs/pref_service.h" |
38 #include "chrome/browser/prefs/session_startup_pref.h" | 37 #include "chrome/browser/prefs/session_startup_pref.h" |
39 #include "chrome/browser/profiles/profile_manager.h" | 38 #include "chrome/browser/profiles/profile_manager.h" |
40 #include "chrome/common/chrome_notification_types.h" | 39 #include "chrome/common/chrome_notification_types.h" |
41 #include "chrome/common/chrome_switches.h" | 40 #include "chrome/common/chrome_switches.h" |
42 #include "chrome/common/chrome_version_info.h" | 41 #include "chrome/common/chrome_version_info.h" |
43 #include "chrome/common/net/gaia/google_service_auth_error.h" | 42 #include "chrome/common/net/gaia/google_service_auth_error.h" |
| 43 #include "chrome/common/net/url_util.h" |
44 #include "chrome/common/pref_names.h" | 44 #include "chrome/common/pref_names.h" |
45 #include "chrome/common/url_constants.h" | 45 #include "chrome/common/url_constants.h" |
46 #include "chromeos/dbus/dbus_thread_manager.h" | 46 #include "chromeos/dbus/dbus_thread_manager.h" |
47 #include "chromeos/dbus/session_manager_client.h" | 47 #include "chromeos/dbus/session_manager_client.h" |
48 #include "content/public/browser/browser_thread.h" | 48 #include "content/public/browser/browser_thread.h" |
49 #include "content/public/browser/notification_service.h" | 49 #include "content/public/browser/notification_service.h" |
50 #include "content/public/browser/notification_types.h" | 50 #include "content/public/browser/notification_types.h" |
51 #include "grit/generated_resources.h" | 51 #include "grit/generated_resources.h" |
52 #include "net/http/http_auth_cache.h" | 52 #include "net/http/http_auth_cache.h" |
53 #include "net/http/http_network_session.h" | 53 #include "net/http/http_network_session.h" |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 #if defined(NEW_GSG_URL) | 755 #if defined(NEW_GSG_URL) |
756 std::string ExistingUserController::GetGettingStartedGuideURL() const { | 756 std::string ExistingUserController::GetGettingStartedGuideURL() const { |
757 GURL guide_url(kGetStartedURLPattern); | 757 GURL guide_url(kGetStartedURLPattern); |
758 std::string board; | 758 std::string board; |
759 const char kMachineInfoBoard[] = "CHROMEOS_RELEASE_BOARD"; | 759 const char kMachineInfoBoard[] = "CHROMEOS_RELEASE_BOARD"; |
760 system::StatisticsProvider* provider = | 760 system::StatisticsProvider* provider = |
761 system::StatisticsProvider::GetInstance(); | 761 system::StatisticsProvider::GetInstance(); |
762 if (!provider->GetMachineStatistic(kMachineInfoBoard, &board)) | 762 if (!provider->GetMachineStatistic(kMachineInfoBoard, &board)) |
763 LOG(ERROR) << "Failed to get board information"; | 763 LOG(ERROR) << "Failed to get board information"; |
764 if (!board.empty()) { | 764 if (!board.empty()) { |
765 guide_url = chrome_browser_net::AppendQueryParameter(guide_url, | 765 guide_url = chrome_common_net::AppendQueryParameter(guide_url, |
766 kGetStartedBoardParam, | 766 kGetStartedBoardParam, |
767 board); | 767 board); |
768 } | 768 } |
769 if (is_owner_login_) { | 769 if (is_owner_login_) { |
770 guide_url = chrome_browser_net::AppendQueryParameter( | 770 guide_url = chrome_common_net::AppendQueryParameter( |
771 guide_url, | 771 guide_url, |
772 kGetStartedOwnerParam, | 772 kGetStartedOwnerParam, |
773 kGetStartedOwnerParamValue); | 773 kGetStartedOwnerParamValue); |
774 } | 774 } |
775 guide_url = google_util::AppendGoogleLocaleParam(guide_url); | 775 guide_url = google_util::AppendGoogleLocaleParam(guide_url); |
776 guide_url = chrome_browser_net::AppendQueryParameter( | 776 guide_url = chrome_common_net::AppendQueryParameter( |
777 guide_url, | 777 guide_url, |
778 kGetStartedInitialLocaleParam, | 778 kGetStartedInitialLocaleParam, |
779 WizardController::GetInitialLocale()); | 779 WizardController::GetInitialLocale()); |
780 return guide_url.spec(); | 780 return guide_url.spec(); |
781 } | 781 } |
782 #else | 782 #else |
783 std::string ExistingUserController::GetGettingStartedGuideURL() const { | 783 std::string ExistingUserController::GetGettingStartedGuideURL() const { |
784 const char* url = kGetStartedURLPattern; | 784 const char* url = kGetStartedURLPattern; |
785 PrefService* prefs = g_browser_process->local_state(); | 785 PrefService* prefs = g_browser_process->local_state(); |
786 const std::string current_locale = | 786 const std::string current_locale = |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 // Invalidate OAuth token, since it can't be correct after password is | 866 // Invalidate OAuth token, since it can't be correct after password is |
867 // changed. | 867 // changed. |
868 UserManager::Get()->SaveUserOAuthStatus(username, | 868 UserManager::Get()->SaveUserOAuthStatus(username, |
869 User::OAUTH_TOKEN_STATUS_INVALID); | 869 User::OAUTH_TOKEN_STATUS_INVALID); |
870 | 870 |
871 login_display_->SetUIEnabled(true); | 871 login_display_->SetUIEnabled(true); |
872 login_display_->ShowGaiaPasswordChanged(username); | 872 login_display_->ShowGaiaPasswordChanged(username); |
873 } | 873 } |
874 | 874 |
875 } // namespace chromeos | 875 } // namespace chromeos |
OLD | NEW |