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

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

Issue 328383003: Revert of 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/login/fake_login_utils.h" 5 #include "chrome/browser/chromeos/login/fake_login_utils.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/login/auth/mock_authenticator.h" 10 #include "chrome/browser/chromeos/login/auth/mock_authenticator.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 chrome::startup::IS_PROCESS_STARTUP, 48 chrome::startup::IS_PROCESS_STARTUP,
49 first_run, 49 first_run,
50 NULL)); 50 NULL));
51 } 51 }
52 if (login_host) 52 if (login_host)
53 login_host->Finalize(); 53 login_host->Finalize();
54 UserManager::Get()->SessionStarted(); 54 UserManager::Get()->SessionStarted();
55 } 55 }
56 56
57 void FakeLoginUtils::PrepareProfile(const UserContext& user_context, 57 void FakeLoginUtils::PrepareProfile(const UserContext& user_context,
58 const std::string& display_email,
58 bool has_cookies, 59 bool has_cookies,
59 bool has_active_session, 60 bool has_active_session,
60 LoginUtils::Delegate* delegate) { 61 LoginUtils::Delegate* delegate) {
61 UserManager::Get()->UserLoggedIn( 62 UserManager::Get()->UserLoggedIn(
62 user_context.GetUserID(), user_context.GetUserIDHash(), false); 63 user_context.GetUserID(), user_context.GetUserIDHash(), false);
63 User* user = UserManager::Get()->FindUserAndModify(user_context.GetUserID()); 64 User* user = UserManager::Get()->FindUserAndModify(user_context.GetUserID());
64 DCHECK(user); 65 DCHECK(user);
65 66
66 // Make sure that we get the real Profile instead of the login Profile. 67 // Make sure that we get the real Profile instead of the login Profile.
67 user->set_profile_is_created(); 68 user->set_profile_is_created();
(...skipping 19 matching lines...) Expand all
87 } 88 }
88 89
89 void FakeLoginUtils::DelegateDeleted(LoginUtils::Delegate* delegate) { 90 void FakeLoginUtils::DelegateDeleted(LoginUtils::Delegate* delegate) {
90 NOTREACHED() << "Method not implemented."; 91 NOTREACHED() << "Method not implemented.";
91 } 92 }
92 93
93 void FakeLoginUtils::CompleteOffTheRecordLogin(const GURL& start_url) { 94 void FakeLoginUtils::CompleteOffTheRecordLogin(const GURL& start_url) {
94 NOTREACHED() << "Method not implemented."; 95 NOTREACHED() << "Method not implemented.";
95 } 96 }
96 97
98 void FakeLoginUtils::SetFirstLoginPrefs(PrefService* prefs) {
99 NOTREACHED() << "Method not implemented.";
100 }
101
97 scoped_refptr<Authenticator> FakeLoginUtils::CreateAuthenticator( 102 scoped_refptr<Authenticator> FakeLoginUtils::CreateAuthenticator(
98 LoginStatusConsumer* consumer) { 103 LoginStatusConsumer* consumer) {
99 authenticator_ = new MockAuthenticator(consumer, expected_user_context_); 104 authenticator_ = new MockAuthenticator(consumer, expected_user_context_);
100 return authenticator_; 105 return authenticator_;
101 } 106 }
102 107
108 void FakeLoginUtils::RestoreAuthenticationSession(Profile* profile) {
109 NOTREACHED() << "Method not implemented.";
110 }
111
112 void FakeLoginUtils::InitRlzDelayed(Profile* user_profile) {
113 NOTREACHED() << "Method not implemented.";
114 }
115
103 void FakeLoginUtils::SetExpectedCredentials(const UserContext& user_context) { 116 void FakeLoginUtils::SetExpectedCredentials(const UserContext& user_context) {
104 expected_user_context_ = user_context; 117 expected_user_context_ = user_context;
105 if (authenticator_) { 118 if (authenticator_) {
106 static_cast<MockAuthenticator*>(authenticator_.get())-> 119 static_cast<MockAuthenticator*>(authenticator_.get())->
107 SetExpectedCredentials(user_context); 120 SetExpectedCredentials(user_context);
108 } 121 }
109 } 122 }
110 123
111 } // namespace chromeos 124 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/fake_login_utils.h ('k') | chrome/browser/chromeos/login/login_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698