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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc

Issue 318853004: Introduce SessionManager that will contain code to start user session on Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/app_mode/kiosk_profile_loader.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_profile_loader.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 // If we are launching a demo session, we need to start MountGuest with the 154 // If we are launching a demo session, we need to start MountGuest with the
155 // guest username; this is because there are several places in the cros code 155 // guest username; this is because there are several places in the cros code
156 // which rely on the username sent to cryptohome to be $guest. Back in Chrome 156 // which rely on the username sent to cryptohome to be $guest. Back in Chrome
157 // we switch this back to the demo user name to correctly identify this 157 // we switch this back to the demo user name to correctly identify this
158 // user as a demo user. 158 // user as a demo user.
159 UserContext context = user_context; 159 UserContext context = user_context;
160 if (context.GetUserID() == UserManager::kGuestUserName) 160 if (context.GetUserID() == UserManager::kGuestUserName)
161 context.SetUserID(DemoAppLauncher::kDemoUserName); 161 context.SetUserID(DemoAppLauncher::kDemoUserName);
162 LoginUtils::Get()->PrepareProfile(context, 162 LoginUtils::Get()->PrepareProfile(context,
163 std::string(), // display email
Denis Kuznetsov (DE-MUC) 2014/06/11 15:38:50 nit: align comments?
Nikita (slow) 2014/06/11 16:44:02 they are aligned, since display email is now remov
164 false, // has_cookies 163 false, // has_cookies
165 false, // has_active_session 164 false, // has_active_session
166 this); 165 this);
167 } 166 }
168 167
169 void KioskProfileLoader::OnLoginFailure(const LoginFailure& error) { 168 void KioskProfileLoader::OnLoginFailure(const LoginFailure& error) {
170 ReportLaunchResult(LoginFailureToKioskAppLaunchError(error)); 169 ReportLaunchResult(LoginFailureToKioskAppLaunchError(error));
171 } 170 }
172 171
173 void KioskProfileLoader::WhiteListCheckFailed(const std::string& email) { 172 void KioskProfileLoader::WhiteListCheckFailed(const std::string& email) {
(...skipping 12 matching lines...) Expand all
186 void KioskProfileLoader::OnProfilePrepared(Profile* profile) { 185 void KioskProfileLoader::OnProfilePrepared(Profile* profile) {
187 // This object could be deleted any time after successfully reporting 186 // This object could be deleted any time after successfully reporting
188 // a profile load, so invalidate the LoginUtils delegate now. 187 // a profile load, so invalidate the LoginUtils delegate now.
189 LoginUtils::Get()->DelegateDeleted(this); 188 LoginUtils::Get()->DelegateDeleted(this);
190 189
191 delegate_->OnProfileLoaded(profile); 190 delegate_->OnProfileLoaded(profile);
192 ReportLaunchResult(KioskAppLaunchError::NONE); 191 ReportLaunchResult(KioskAppLaunchError::NONE);
193 } 192 }
194 193
195 } // namespace chromeos 194 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698