Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 1141163003: Enabled first-run tutorial for ephemeral users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 CHECK(host); 1114 CHECK(host);
1115 host->StartWizard(screen_name); 1115 host->StartWizard(screen_name);
1116 } 1116 }
1117 1117
1118 void UserSessionManager::InitializeStartUrls() const { 1118 void UserSessionManager::InitializeStartUrls() const {
1119 // Child account status should be known by the time of this call. 1119 // Child account status should be known by the time of this call.
1120 std::vector<std::string> start_urls; 1120 std::vector<std::string> start_urls;
1121 1121
1122 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); 1122 user_manager::UserManager* user_manager = user_manager::UserManager::Get();
1123 1123
1124 bool can_show_getstarted_guide = 1124 bool can_show_getstarted_guide = user_manager->GetActiveUser()->GetType() ==
1125 user_manager->GetActiveUser()->GetType() == 1125 user_manager::USER_TYPE_REGULAR;
1126 user_manager::USER_TYPE_REGULAR &&
1127 !user_manager->IsCurrentUserNonCryptohomeDataEphemeral();
1128 1126
1129 // Skip the default first-run behavior for public accounts. 1127 // Skip the default first-run behavior for public accounts.
1130 if (!user_manager->IsLoggedInAsPublicAccount()) { 1128 if (!user_manager->IsLoggedInAsPublicAccount()) {
1131 if (AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { 1129 if (AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) {
1132 const char* url = kChromeVoxTutorialURLPattern; 1130 const char* url = kChromeVoxTutorialURLPattern;
1133 PrefService* prefs = g_browser_process->local_state(); 1131 PrefService* prefs = g_browser_process->local_state();
1134 const std::string current_locale = 1132 const std::string current_locale =
1135 base::StringToLowerASCII(prefs->GetString(prefs::kApplicationLocale)); 1133 base::StringToLowerASCII(prefs->GetString(prefs::kApplicationLocale));
1136 std::string vox_url = base::StringPrintf(url, current_locale.c_str()); 1134 std::string vox_url = base::StringPrintf(url, current_locale.c_str());
1137 start_urls.push_back(vox_url); 1135 start_urls.push_back(vox_url);
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 if (is_enterprise_managed) 1664 if (is_enterprise_managed)
1667 display = USER_PODS_DISPLAY_DISABLED_MANAGED; 1665 display = USER_PODS_DISPLAY_DISABLED_MANAGED;
1668 else 1666 else
1669 display = USER_PODS_DISPLAY_DISABLED_REGULAR; 1667 display = USER_PODS_DISPLAY_DISABLED_REGULAR;
1670 } 1668 }
1671 UMA_HISTOGRAM_ENUMERATION("UserSessionManager.UserPodsDisplay", display, 1669 UMA_HISTOGRAM_ENUMERATION("UserSessionManager.UserPodsDisplay", display,
1672 NUM_USER_PODS_DISPLAY); 1670 NUM_USER_PODS_DISPLAY);
1673 } 1671 }
1674 1672
1675 } // namespace chromeos 1673 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698