Chromium Code Reviews| Index: chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc |
| diff --git a/chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc b/chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc |
| index cd386b89b1cdb41b5ec8c26c3eae268f06195473..548f885fd8af3ebc7d14dffbcf61a2e532daf672 100644 |
| --- a/chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc |
| +++ b/chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc |
| @@ -117,10 +117,10 @@ class KioskProfileLoader::CryptohomedChecker |
| // KioskProfileLoader |
| KioskProfileLoader::KioskProfileLoader(const std::string& app_user_id, |
| - bool force_ephemeral, |
| + bool force_guest, |
| Delegate* delegate) |
| : user_id_(app_user_id), |
| - force_ephemeral_(force_ephemeral), |
| + force_guest_(force_guest), |
| delegate_(delegate) {} |
| KioskProfileLoader::~KioskProfileLoader() {} |
| @@ -134,7 +134,7 @@ void KioskProfileLoader::Start() { |
| void KioskProfileLoader::LoginAsKioskAccount() { |
| login_performer_.reset(new LoginPerformer(this)); |
| - login_performer_->LoginAsKioskAccount(user_id_, force_ephemeral_); |
| + login_performer_->LoginAsKioskAccount(user_id_, force_guest_); |
| } |
| void KioskProfileLoader::ReportLaunchResult(KioskAppLaunchError::Error error) { |
| @@ -156,8 +156,14 @@ void KioskProfileLoader::OnLoginSuccess(const UserContext& user_context) { |
| // we switch this back to the demo user name to correctly identify this |
| // user as a demo user. |
| UserContext context = user_context; |
| - if (context.username == UserManager::kGuestUserName) |
| + if (context.username == UserManager::kGuestUserName) { |
| context.username = DemoAppLauncher::kDemoUserName; |
| + // We can't have an empty hash. Currently mounting guest does not actually |
| + // give us a user hash; the way we deal with this for Guest Mode is by |
| + // setting a fake hash value. This needs to be fixed, see crbug.com/355134. |
| + if (context.username_hash.empty()) |
| + context.username_hash = context.username + "- demouserhashfakevalue"; |
|
xiyuan
2014/03/22 04:02:42
nit: strip the space between "-" and the suffix.
bartfab (slow)
2014/03/25 12:52:54
1) Why not simply use "demouserhashfakevalue" as t
rkc
2014/03/26 21:30:40
So this wasn't really a good solution to go with.
rkc
2014/03/26 21:30:40
Code removed.
|
| + } |
| LoginUtils::Get()->PrepareProfile(context, |
| std::string(), // display email |
| false, // has_cookies |