OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/session/user_session_manager.h" | 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 | 1138 |
1139 bool can_show_getstarted_guide = user_manager->GetActiveUser()->GetType() == | 1139 bool can_show_getstarted_guide = user_manager->GetActiveUser()->GetType() == |
1140 user_manager::USER_TYPE_REGULAR; | 1140 user_manager::USER_TYPE_REGULAR; |
1141 | 1141 |
1142 // Skip the default first-run behavior for public accounts. | 1142 // Skip the default first-run behavior for public accounts. |
1143 if (!user_manager->IsLoggedInAsPublicAccount()) { | 1143 if (!user_manager->IsLoggedInAsPublicAccount()) { |
1144 if (AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { | 1144 if (AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { |
1145 const char* url = kChromeVoxTutorialURLPattern; | 1145 const char* url = kChromeVoxTutorialURLPattern; |
1146 PrefService* prefs = g_browser_process->local_state(); | 1146 PrefService* prefs = g_browser_process->local_state(); |
1147 const std::string current_locale = | 1147 const std::string current_locale = |
1148 base::StringToLowerASCII(prefs->GetString(prefs::kApplicationLocale)); | 1148 base::ToLowerASCII(prefs->GetString(prefs::kApplicationLocale)); |
1149 std::string vox_url = base::StringPrintf(url, current_locale.c_str()); | 1149 std::string vox_url = base::StringPrintf(url, current_locale.c_str()); |
1150 start_urls.push_back(vox_url); | 1150 start_urls.push_back(vox_url); |
1151 can_show_getstarted_guide = false; | 1151 can_show_getstarted_guide = false; |
1152 } | 1152 } |
1153 } | 1153 } |
1154 | 1154 |
1155 // Only show getting started guide for a new user. | 1155 // Only show getting started guide for a new user. |
1156 const bool should_show_getstarted_guide = user_manager->IsCurrentUserNew(); | 1156 const bool should_show_getstarted_guide = user_manager->IsCurrentUserNew(); |
1157 | 1157 |
1158 if (can_show_getstarted_guide && should_show_getstarted_guide) { | 1158 if (can_show_getstarted_guide && should_show_getstarted_guide) { |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 token_handle_util_.reset(); | 1727 token_handle_util_.reset(); |
1728 } | 1728 } |
1729 | 1729 |
1730 void UserSessionManager::CreateTokenUtilIfMissing() { | 1730 void UserSessionManager::CreateTokenUtilIfMissing() { |
1731 if (!token_handle_util_.get()) | 1731 if (!token_handle_util_.get()) |
1732 token_handle_util_.reset( | 1732 token_handle_util_.reset( |
1733 new TokenHandleUtil(user_manager::UserManager::Get())); | 1733 new TokenHandleUtil(user_manager::UserManager::Get())); |
1734 } | 1734 } |
1735 | 1735 |
1736 } // namespace chromeos | 1736 } // namespace chromeos |
OLD | NEW |