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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 14069017: Move *UserLoggedIn methods from UserManager to UserManagerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit addressed. Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
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/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/chromeos/chromeos_version.h" 10 #include "base/chromeos/chromeos_version.h"
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 // Hence changing input methods here, just because the user's UI language 705 // Hence changing input methods here, just because the user's UI language
706 // is different from the login screen UI language, is not desirable. Note 706 // is different from the login screen UI language, is not desirable. Note
707 // that input method preferences are synced, so users can use their 707 // that input method preferences are synced, so users can use their
708 // farovite input methods as soon as the preferences are synced. 708 // farovite input methods as soon as the preferences are synced.
709 LanguageSwitchMenu::SwitchLanguage(pref_locale); 709 LanguageSwitchMenu::SwitchLanguage(pref_locale);
710 } 710 }
711 711
712 void LoginUtilsImpl::CompleteOffTheRecordLogin(const GURL& start_url) { 712 void LoginUtilsImpl::CompleteOffTheRecordLogin(const GURL& start_url) {
713 VLOG(1) << "Completing incognito login"; 713 VLOG(1) << "Completing incognito login";
714 714
715 UserManager::Get()->GuestUserLoggedIn();
716
717 // For guest session we ask session manager to restart Chrome with --bwsi 715 // For guest session we ask session manager to restart Chrome with --bwsi
718 // flag. We keep only some of the arguments of this process. 716 // flag. We keep only some of the arguments of this process.
719 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 717 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
720 CommandLine command_line(browser_command_line.GetProgram()); 718 CommandLine command_line(browser_command_line.GetProgram());
721 std::string cmd_line_str = GetOffTheRecordCommandLine(start_url, 719 std::string cmd_line_str = GetOffTheRecordCommandLine(start_url,
722 browser_command_line, 720 browser_command_line,
723 &command_line); 721 &command_line);
724 722
725 RestartChrome(cmd_line_str); 723 RestartChrome(cmd_line_str);
726 } 724 }
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 bool LoginUtils::IsWhitelisted(const std::string& username) { 961 bool LoginUtils::IsWhitelisted(const std::string& username) {
964 CrosSettings* cros_settings = CrosSettings::Get(); 962 CrosSettings* cros_settings = CrosSettings::Get();
965 bool allow_new_user = false; 963 bool allow_new_user = false;
966 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 964 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
967 if (allow_new_user) 965 if (allow_new_user)
968 return true; 966 return true;
969 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); 967 return cros_settings->FindEmailInList(kAccountsPrefUsers, username);
970 } 968 }
971 969
972 } // namespace chromeos 970 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698