Index: chrome/browser/chromeos/login/parallel_authenticator.cc |
diff --git a/chrome/browser/chromeos/login/parallel_authenticator.cc b/chrome/browser/chromeos/login/parallel_authenticator.cc |
index 85ae4b9739f53f3c7e48bcb36fd416e20073f0ec..29ffe01df4da276ab7900e54bca1ab2e094bd509 100644 |
--- a/chrome/browser/chromeos/login/parallel_authenticator.cc |
+++ b/chrome/browser/chromeos/login/parallel_authenticator.cc |
@@ -348,19 +348,28 @@ void ParallelAuthenticator::LoginAsPublicAccount(const std::string& username) { |
void ParallelAuthenticator::LoginAsKioskAccount( |
const std::string& app_user_id, bool force_ephemeral) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
+ |
+ std::string user_id = |
+ force_ephemeral ? UserManager::kGuestUserName : app_user_id; |
current_state_.reset(new AuthAttemptState( |
- UserContext(app_user_id, |
+ UserContext(user_id, |
std::string(), // password |
std::string()), // auth_code |
std::string(), // login_token |
std::string(), // login_captcha |
User::USER_TYPE_KIOSK_APP, |
false)); |
+ |
remove_user_data_on_failure_ = true; |
- int ephemeral_flag = force_ephemeral ? cryptohome::ENSURE_EPHEMERAL : 0; |
- MountPublic(current_state_.get(), |
- scoped_refptr<ParallelAuthenticator>(this), |
- cryptohome::CREATE_IF_MISSING | ephemeral_flag); |
+ if (!force_ephemeral) { |
+ MountPublic(current_state_.get(), |
+ scoped_refptr<ParallelAuthenticator>(this), |
+ cryptohome::CREATE_IF_MISSING); |
+ } else { |
+ ephemeral_mount_attempted_ = true; |
+ MountGuest(current_state_.get(), |
+ scoped_refptr<ParallelAuthenticator>(this)); |
+ } |
} |
void ParallelAuthenticator::OnRetailModeLoginSuccess() { |