| 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 return host_->GetNativeWindow(); | 708 return host_->GetNativeWindow(); |
| 709 } | 709 } |
| 710 | 710 |
| 711 void ExistingUserController::InitializeStartUrls() const { | 711 void ExistingUserController::InitializeStartUrls() const { |
| 712 std::vector<std::string> start_urls; | 712 std::vector<std::string> start_urls; |
| 713 // Guide URL is not added to start URLs as it should be passed as an app. | 713 // Guide URL is not added to start URLs as it should be passed as an app. |
| 714 std::string guide_url; | 714 std::string guide_url; |
| 715 | 715 |
| 716 PrefService* prefs = g_browser_process->local_state(); | 716 PrefService* prefs = g_browser_process->local_state(); |
| 717 const base::ListValue *urls; | 717 const base::ListValue *urls; |
| 718 if (UserManager::Get()->IsLoggedInAsDemoUser() && | 718 if (UserManager::Get()->IsLoggedInAsDemoUser()) { |
| 719 CrosSettings::Get()->GetList(kStartUpUrls, &urls)) { | 719 if (CrosSettings::Get()->GetList(kStartUpUrls, &urls)) { |
| 720 // the demo user will get its start urls from the special policy if it is | 720 // the demo user will get its start urls from the special policy if it is |
| 721 // set. | 721 // set. |
| 722 for (base::ListValue::const_iterator it = urls->begin(); | 722 for (base::ListValue::const_iterator it = urls->begin(); |
| 723 it != urls->end(); ++it) { | 723 it != urls->end(); ++it) { |
| 724 std::string url; | 724 std::string url; |
| 725 if ((*it)->GetAsString(&url)) | 725 if ((*it)->GetAsString(&url)) |
| 726 start_urls.push_back(url); | 726 start_urls.push_back(url); |
| 727 } |
| 727 } | 728 } |
| 728 } else { | 729 } else { |
| 729 if (prefs->GetBoolean(prefs::kSpokenFeedbackEnabled)) { | 730 if (prefs->GetBoolean(prefs::kSpokenFeedbackEnabled)) { |
| 730 const char* url = kChromeVoxTutorialURLPattern; | 731 const char* url = kChromeVoxTutorialURLPattern; |
| 731 const std::string current_locale = | 732 const std::string current_locale = |
| 732 StringToLowerASCII(prefs->GetString(prefs::kApplicationLocale)); | 733 StringToLowerASCII(prefs->GetString(prefs::kApplicationLocale)); |
| 733 std::string vox_url = base::StringPrintf(url, current_locale.c_str()); | 734 std::string vox_url = base::StringPrintf(url, current_locale.c_str()); |
| 734 start_urls.push_back(vox_url); | 735 start_urls.push_back(vox_url); |
| 735 } else { | 736 } else { |
| 736 guide_url = GetGettingStartedGuideURL(); | 737 guide_url = GetGettingStartedGuideURL(); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 // Invalidate OAuth token, since it can't be correct after password is | 870 // Invalidate OAuth token, since it can't be correct after password is |
| 870 // changed. | 871 // changed. |
| 871 UserManager::Get()->SaveUserOAuthStatus(username, | 872 UserManager::Get()->SaveUserOAuthStatus(username, |
| 872 User::OAUTH_TOKEN_STATUS_INVALID); | 873 User::OAUTH_TOKEN_STATUS_INVALID); |
| 873 | 874 |
| 874 login_display_->SetUIEnabled(true); | 875 login_display_->SetUIEnabled(true); |
| 875 login_display_->ShowGaiaPasswordChanged(username); | 876 login_display_->ShowGaiaPasswordChanged(username); |
| 876 } | 877 } |
| 877 | 878 |
| 878 } // namespace chromeos | 879 } // namespace chromeos |
| OLD | NEW |