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

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

Issue 656283002: [session_manager] Move user session initialization code out of ExistingUserController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move first run session init and browser launch out of EUC Created 6 years, 2 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
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/test_login_utils.h" 5 #include "chrome/browser/chromeos/login/test_login_utils.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chromeos/login/auth/mock_authenticator.h" 9 #include "chromeos/login/auth/mock_authenticator.h"
10 #include "chromeos/login/auth/user_context.h" 10 #include "chromeos/login/auth/user_context.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 13
14 TestLoginUtils::TestLoginUtils(const UserContext& user_context) 14 TestLoginUtils::TestLoginUtils(const UserContext& user_context)
15 : expected_user_context_(user_context) { 15 : expected_user_context_(user_context) {
16 } 16 }
17 17
18 TestLoginUtils::~TestLoginUtils() {} 18 TestLoginUtils::~TestLoginUtils() {}
19 19
20 void TestLoginUtils::PrepareProfile( 20 void TestLoginUtils::PrepareProfile(
21 const UserContext& user_context, 21 const UserContext& user_context,
22 bool has_auth_cookies, 22 bool has_auth_cookies,
23 bool has_active_session, 23 bool has_active_session,
24 Delegate* delegate) { 24 Delegate* delegate) {
25 if (user_context != expected_user_context_) 25 if (user_context != expected_user_context_)
26 NOTREACHED(); 26 NOTREACHED();
27
27 // Profile hasn't been loaded. 28 // Profile hasn't been loaded.
28 delegate->OnProfilePrepared(NULL); 29 delegate->OnProfilePrepared(NULL, false);
29 } 30 }
30 31
31 void TestLoginUtils::DelegateDeleted(Delegate* delegate) { 32 void TestLoginUtils::DelegateDeleted(Delegate* delegate) {
32 } 33 }
33 34
34 scoped_refptr<Authenticator> TestLoginUtils::CreateAuthenticator( 35 scoped_refptr<Authenticator> TestLoginUtils::CreateAuthenticator(
35 AuthStatusConsumer* consumer) { 36 AuthStatusConsumer* consumer) {
36 return new MockAuthenticator(consumer, expected_user_context_); 37 return new MockAuthenticator(consumer, expected_user_context_);
37 } 38 }
38 39
39 bool TestLoginUtils::RestartToApplyPerSessionFlagsIfNeed(Profile* profile, 40 bool TestLoginUtils::RestartToApplyPerSessionFlagsIfNeed(Profile* profile,
40 bool early_restart) { 41 bool early_restart) {
41 return false; 42 return false;
42 } 43 }
43 44
44 } // namespace chromeos 45 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698