| Index: chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| index eb3d3a1854430900da260540b893328f2d94eef3..91a4d6072eff2b47ec7c6693ab0b23d2ba713c03 100644
|
| --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| @@ -93,6 +93,7 @@
|
| #include "chromeos/chromeos_paths.h"
|
| #include "chromeos/chromeos_switches.h"
|
| #include "chromeos/cryptohome/async_method_caller.h"
|
| +#include "chromeos/cryptohome/cryptohome_parameters.h"
|
| #include "chromeos/cryptohome/homedir_methods.h"
|
| #include "chromeos/cryptohome/system_salt_getter.h"
|
| #include "chromeos/dbus/dbus_thread_manager.h"
|
| @@ -104,6 +105,7 @@
|
| #include "chromeos/dbus/services/proxy_resolution_service_provider.h"
|
| #include "chromeos/dbus/session_manager_client.h"
|
| #include "chromeos/disks/disk_mount_manager.h"
|
| +#include "chromeos/login/auth/utils.h"
|
| #include "chromeos/login/login_state.h"
|
| #include "chromeos/login/user_names.h"
|
| #include "chromeos/login_event_recorder.h"
|
| @@ -317,7 +319,8 @@ void ChromeBrowserMainPartsChromeos::PreEarlyInitialization() {
|
| !parsed_command_line().HasSwitch(switches::kLoginUser) &&
|
| !parsed_command_line().HasSwitch(switches::kGuestSession)) {
|
| singleton_command_line->AppendSwitchASCII(
|
| - switches::kLoginUser, login::StubAccountId().GetUserEmail());
|
| + switches::kLoginUser,
|
| + cryptohome::Identification(login::StubAccountId()).id());
|
| if (!parsed_command_line().HasSwitch(switches::kLoginProfile)) {
|
| singleton_command_line->AppendSwitchASCII(switches::kLoginProfile,
|
| chrome::kTestUserProfileDir);
|
| @@ -496,11 +499,13 @@ void ChromeBrowserMainPartsChromeos::PreProfileInit() {
|
| ChromeBrowserMainPartsLinux::PreProfileInit();
|
|
|
| if (immediate_login) {
|
| - const std::string user_email = login::CanonicalizeUserID(
|
| - parsed_command_line().GetSwitchValueASCII(switches::kLoginUser));
|
| + const std::string cryptohome_id =
|
| + parsed_command_line().GetSwitchValueASCII(switches::kLoginUser);
|
| + const AccountId account_id(cryptohome::GetAccountId(
|
| + cryptohome::Identification::FromString(cryptohome_id)));
|
| +
|
| user_manager::UserManager* user_manager = user_manager::UserManager::Get();
|
|
|
| - const AccountId account_id(AccountId::FromUserEmail(user_email));
|
| if (policy::IsDeviceLocalAccountUser(account_id.GetUserEmail(), NULL) &&
|
| !user_manager->IsKnownUser(account_id)) {
|
| // When a device-local account is removed, its policy is deleted from disk
|
| @@ -517,7 +522,7 @@ void ChromeBrowserMainPartsChromeos::PreProfileInit() {
|
| std::string user_id_hash =
|
| parsed_command_line().GetSwitchValueASCII(switches::kLoginProfile);
|
| user_manager->UserLoggedIn(account_id, user_id_hash, true);
|
| - VLOG(1) << "Relaunching browser for user: " << user_email
|
| + VLOG(1) << "Relaunching browser for user: " << account_id.Serialize()
|
| << " with hash: " << user_id_hash;
|
| }
|
| }
|
|
|