OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 const std::string& login_token, | 111 const std::string& login_token, |
112 const std::string& login_captcha); | 112 const std::string& login_captcha); |
113 | 113 |
114 // Given a |username| and |password|, this method attempts to | 114 // Given a |username| and |password|, this method attempts to |
115 // authenticate to the cached credentials. This will never contact | 115 // authenticate to the cached credentials. This will never contact |
116 // the server even if it's online. The auth result is sent to | 116 // the server even if it's online. The auth result is sent to |
117 // LoginStatusConsumer in a same way as AuthenticateToLogin does. | 117 // LoginStatusConsumer in a same way as AuthenticateToLogin does. |
118 bool AuthenticateToUnlock(const std::string& username, | 118 bool AuthenticateToUnlock(const std::string& username, |
119 const std::string& password); | 119 const std::string& password); |
120 | 120 |
121 // Initiates off the record ("browse without signing in") login. | 121 // Initiates incognito ("browse without signing in") login. |
122 // Mounts tmpfs and notifies consumer on the success/failure. | 122 // Mounts tmpfs and notifies consumer on the success/failure. |
123 void LoginOffTheRecord(); | 123 void LoginOffTheRecord(); |
124 | 124 |
125 // These methods must be called on the UI thread, as they make DBus calls | 125 // These methods must be called on the UI thread, as they make DBus calls |
126 // and also call back to the login UI. | 126 // and also call back to the login UI. |
127 void OnLoginSuccess(const GaiaAuthConsumer::ClientLoginResult& credentials, | 127 void OnLoginSuccess(const GaiaAuthConsumer::ClientLoginResult& credentials, |
128 bool request_pending); | 128 bool request_pending); |
129 void OnOffTheRecordLoginSuccess(); | 129 void OnOffTheRecordLoginSuccess(); |
130 void OnPasswordChangeDetected( | 130 void OnPasswordChangeDetected( |
131 const GaiaAuthConsumer::ClientLoginResult& credentials); | 131 const GaiaAuthConsumer::ClientLoginResult& credentials); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, ReadLocalaccount); | 272 FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, ReadLocalaccount); |
273 FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, | 273 FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, |
274 ReadLocalaccountTrailingWS); | 274 ReadLocalaccountTrailingWS); |
275 FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, ReadNoLocalaccount); | 275 FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, ReadNoLocalaccount); |
276 DISALLOW_COPY_AND_ASSIGN(ParallelAuthenticator); | 276 DISALLOW_COPY_AND_ASSIGN(ParallelAuthenticator); |
277 }; | 277 }; |
278 | 278 |
279 } // namespace chromeos | 279 } // namespace chromeos |
280 | 280 |
281 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_ | 281 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_PARALLEL_AUTHENTICATOR_H_ |
OLD | NEW |