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

Side by Side Diff: chrome/browser/chromeos/login/auth/parallel_authenticator.h

Issue 296773002: Add a Key class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_AUTH_PARALLEL_AUTHENTICATOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_PARALLEL_AUTHENTICATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_PARALLEL_AUTHENTICATOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_PARALLEL_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 // AuthAttemptStateResolver overrides. 151 // AuthAttemptStateResolver overrides.
152 // Attempts to make a decision and call back |consumer_| based on 152 // Attempts to make a decision and call back |consumer_| based on
153 // the state we have gathered at the time of call. If a decision 153 // the state we have gathered at the time of call. If a decision
154 // can't be made, defers until the next time this is called. 154 // can't be made, defers until the next time this is called.
155 // When a decision is made, will call back to |consumer_| on the UI thread. 155 // When a decision is made, will call back to |consumer_| on the UI thread.
156 // 156 //
157 // Must be called on the UI thread. 157 // Must be called on the UI thread.
158 virtual void Resolve() OVERRIDE; 158 virtual void Resolve() OVERRIDE;
159 159
160 // Returns hash of |password|, salted with the system salt.
161 static std::string HashPassword(const std::string& password,
162 const std::string& ascii_salt);
163
164 void OnOffTheRecordLoginSuccess(); 160 void OnOffTheRecordLoginSuccess();
165 void OnPasswordChangeDetected(); 161 void OnPasswordChangeDetected();
166 162
167 protected: 163 protected:
168 virtual ~ParallelAuthenticator(); 164 virtual ~ParallelAuthenticator();
169 165
170 private: 166 private:
171 friend class ParallelAuthenticatorTest; 167 friend class ParallelAuthenticatorTest;
172 FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest, 168 FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest,
173 ResolveOwnerNeededDirectFailedMount); 169 ResolveOwnerNeededDirectFailedMount);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // When |remove_user_data_on_failure_| is set, we delay calling 242 // When |remove_user_data_on_failure_| is set, we delay calling
247 // consumer_->OnLoginFailure() until we removed the user cryptohome. 243 // consumer_->OnLoginFailure() until we removed the user cryptohome.
248 const LoginFailure* delayed_login_failure_; 244 const LoginFailure* delayed_login_failure_;
249 245
250 DISALLOW_COPY_AND_ASSIGN(ParallelAuthenticator); 246 DISALLOW_COPY_AND_ASSIGN(ParallelAuthenticator);
251 }; 247 };
252 248
253 } // namespace chromeos 249 } // namespace chromeos
254 250
255 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_PARALLEL_AUTHENTICATOR_H_ 251 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_PARALLEL_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698