OLD | NEW |
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/mock_authenticator.h" | 5 #include "chrome/browser/chromeos/login/mock_authenticator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/chromeos/login/user.h" | 8 #include "chrome/browser/chromeos/login/user.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 "demo-mode")); | 54 "demo-mode")); |
55 } | 55 } |
56 | 56 |
57 void MockAuthenticator::LoginAsPublicAccount(const std::string& username) { | 57 void MockAuthenticator::LoginAsPublicAccount(const std::string& username) { |
58 consumer_->OnLoginSuccess(UserContext(expected_username_, | 58 consumer_->OnLoginSuccess(UserContext(expected_username_, |
59 std::string(), | 59 std::string(), |
60 std::string(), | 60 std::string(), |
61 expected_username_)); | 61 expected_username_)); |
62 } | 62 } |
63 | 63 |
64 void MockAuthenticator::LoginAsKioskAccount( | 64 void MockAuthenticator::LoginAsKioskAccount(const std::string& app_user_id, |
65 const std::string& app_user_id, bool force_ephemeral) { | 65 bool use_guest_mount) { |
66 consumer_->OnLoginSuccess(UserContext(expected_username_, | 66 consumer_->OnLoginSuccess(UserContext(expected_username_, |
67 std::string(), | 67 std::string(), |
68 std::string(), | 68 std::string(), |
69 expected_username_)); | 69 expected_username_)); |
70 } | 70 } |
71 | 71 |
72 void MockAuthenticator::LoginOffTheRecord() { | 72 void MockAuthenticator::LoginOffTheRecord() { |
73 consumer_->OnOffTheRecordLoginSuccess(); | 73 consumer_->OnOffTheRecordLoginSuccess(); |
74 } | 74 } |
75 | 75 |
(...skipping 18 matching lines...) Expand all Loading... |
94 } | 94 } |
95 | 95 |
96 void MockAuthenticator::SetExpectedCredentials( | 96 void MockAuthenticator::SetExpectedCredentials( |
97 const std::string& expected_username, | 97 const std::string& expected_username, |
98 const std::string& expected_password) { | 98 const std::string& expected_password) { |
99 expected_username_ = expected_username; | 99 expected_username_ = expected_username; |
100 expected_password_ = expected_password; | 100 expected_password_ = expected_password; |
101 } | 101 } |
102 | 102 |
103 } // namespace chromeos | 103 } // namespace chromeos |
OLD | NEW |