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

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

Issue 608283003: Remove retail mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 993
994 void UserSessionManager::ActivateWizard(const std::string& screen_name) { 994 void UserSessionManager::ActivateWizard(const std::string& screen_name) {
995 LoginDisplayHost* host = LoginDisplayHostImpl::default_host(); 995 LoginDisplayHost* host = LoginDisplayHostImpl::default_host();
996 CHECK(host); 996 CHECK(host);
997 host->StartWizard(screen_name); 997 host->StartWizard(screen_name);
998 } 998 }
999 999
1000 void UserSessionManager::InitializeStartUrls() const { 1000 void UserSessionManager::InitializeStartUrls() const {
1001 std::vector<std::string> start_urls; 1001 std::vector<std::string> start_urls;
1002 1002
1003 const base::ListValue *urls;
1004 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); 1003 user_manager::UserManager* user_manager = user_manager::UserManager::Get();
1005 bool can_show_getstarted_guide = 1004 bool can_show_getstarted_guide =
1006 user_manager->GetActiveUser()->GetType() == 1005 user_manager->GetActiveUser()->GetType() ==
1007 user_manager::USER_TYPE_REGULAR && 1006 user_manager::USER_TYPE_REGULAR &&
1008 !user_manager->IsCurrentUserNonCryptohomeDataEphemeral(); 1007 !user_manager->IsCurrentUserNonCryptohomeDataEphemeral();
1009 if (user_manager->IsLoggedInAsDemoUser()) {
1010 if (CrosSettings::Get()->GetList(kStartUpUrls, &urls)) {
1011 // The retail mode user will get start URLs from a special policy if it is
1012 // set.
1013 for (base::ListValue::const_iterator it = urls->begin();
1014 it != urls->end(); ++it) {
1015 std::string url;
1016 if ((*it)->GetAsString(&url))
1017 start_urls.push_back(url);
1018 }
1019 }
1020 can_show_getstarted_guide = false;
1021 // Skip the default first-run behavior for public accounts. 1008 // Skip the default first-run behavior for public accounts.
1022 } else if (!user_manager->IsLoggedInAsPublicAccount()) { 1009 if (!user_manager->IsLoggedInAsPublicAccount()) {
1023 if (AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { 1010 if (AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) {
1024 const char* url = kChromeVoxTutorialURLPattern; 1011 const char* url = kChromeVoxTutorialURLPattern;
1025 PrefService* prefs = g_browser_process->local_state(); 1012 PrefService* prefs = g_browser_process->local_state();
1026 const std::string current_locale = 1013 const std::string current_locale =
1027 base::StringToLowerASCII(prefs->GetString(prefs::kApplicationLocale)); 1014 base::StringToLowerASCII(prefs->GetString(prefs::kApplicationLocale));
1028 std::string vox_url = base::StringPrintf(url, current_locale.c_str()); 1015 std::string vox_url = base::StringPrintf(url, current_locale.c_str());
1029 start_urls.push_back(vox_url); 1016 start_urls.push_back(vox_url);
1030 can_show_getstarted_guide = false; 1017 can_show_getstarted_guide = false;
1031 } 1018 }
1032 } 1019 }
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 InputEventsBlocker* /* input_events_blocker */, 1486 InputEventsBlocker* /* input_events_blocker */,
1500 const locale_util::LanguageSwitchResult& /* result */) { 1487 const locale_util::LanguageSwitchResult& /* result */) {
1501 callback.Run(); 1488 callback.Run();
1502 } 1489 }
1503 1490
1504 void UserSessionManager::RemoveProfileForTesting(Profile* profile) { 1491 void UserSessionManager::RemoveProfileForTesting(Profile* profile) {
1505 default_ime_states_.erase(profile); 1492 default_ime_states_.erase(profile);
1506 } 1493 }
1507 1494
1508 } // namespace chromeos 1495 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698