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

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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 988
989 void UserSessionManager::ActivateWizard(const std::string& screen_name) { 989 void UserSessionManager::ActivateWizard(const std::string& screen_name) {
990 LoginDisplayHost* host = LoginDisplayHostImpl::default_host(); 990 LoginDisplayHost* host = LoginDisplayHostImpl::default_host();
991 CHECK(host); 991 CHECK(host);
992 host->StartWizard(screen_name); 992 host->StartWizard(screen_name);
993 } 993 }
994 994
995 void UserSessionManager::InitializeStartUrls() const { 995 void UserSessionManager::InitializeStartUrls() const {
996 std::vector<std::string> start_urls; 996 std::vector<std::string> start_urls;
997 997
998 const base::ListValue *urls;
999 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); 998 user_manager::UserManager* user_manager = user_manager::UserManager::Get();
1000 bool can_show_getstarted_guide = 999 bool can_show_getstarted_guide =
1001 user_manager->GetActiveUser()->GetType() == 1000 user_manager->GetActiveUser()->GetType() ==
1002 user_manager::USER_TYPE_REGULAR && 1001 user_manager::USER_TYPE_REGULAR &&
1003 !user_manager->IsCurrentUserNonCryptohomeDataEphemeral(); 1002 !user_manager->IsCurrentUserNonCryptohomeDataEphemeral();
1004 if (user_manager->IsLoggedInAsDemoUser()) {
1005 if (CrosSettings::Get()->GetList(kStartUpUrls, &urls)) {
1006 // The retail mode user will get start URLs from a special policy if it is
1007 // set.
1008 for (base::ListValue::const_iterator it = urls->begin();
1009 it != urls->end(); ++it) {
1010 std::string url;
1011 if ((*it)->GetAsString(&url))
1012 start_urls.push_back(url);
1013 }
1014 }
1015 can_show_getstarted_guide = false;
1016 // Skip the default first-run behavior for public accounts. 1003 // Skip the default first-run behavior for public accounts.
1017 } else if (!user_manager->IsLoggedInAsPublicAccount()) { 1004 if (!user_manager->IsLoggedInAsPublicAccount()) {
1018 if (AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) { 1005 if (AccessibilityManager::Get()->IsSpokenFeedbackEnabled()) {
1019 const char* url = kChromeVoxTutorialURLPattern; 1006 const char* url = kChromeVoxTutorialURLPattern;
1020 PrefService* prefs = g_browser_process->local_state(); 1007 PrefService* prefs = g_browser_process->local_state();
1021 const std::string current_locale = 1008 const std::string current_locale =
1022 base::StringToLowerASCII(prefs->GetString(prefs::kApplicationLocale)); 1009 base::StringToLowerASCII(prefs->GetString(prefs::kApplicationLocale));
1023 std::string vox_url = base::StringPrintf(url, current_locale.c_str()); 1010 std::string vox_url = base::StringPrintf(url, current_locale.c_str());
1024 start_urls.push_back(vox_url); 1011 start_urls.push_back(vox_url);
1025 can_show_getstarted_guide = false; 1012 can_show_getstarted_guide = false;
1026 } 1013 }
1027 } 1014 }
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 1465
1479 // static 1466 // static
1480 void UserSessionManager::RunCallbackOnLocaleLoaded( 1467 void UserSessionManager::RunCallbackOnLocaleLoaded(
1481 const base::Closure& callback, 1468 const base::Closure& callback,
1482 InputEventsBlocker* /* input_events_blocker */, 1469 InputEventsBlocker* /* input_events_blocker */,
1483 const locale_util::LanguageSwitchResult& /* result */) { 1470 const locale_util::LanguageSwitchResult& /* result */) {
1484 callback.Run(); 1471 callback.Run();
1485 } 1472 }
1486 1473
1487 } // namespace chromeos 1474 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698