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

Side by Side Diff: chrome/browser/chromeos/login/mock_authenticator.h

Issue 7982025: Made Authenticator::CompleteLogin, AuthenticateToLogin and AuthenticateToUnlock return void. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more obsolete comment fixed. Created 9 years, 3 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_MOCK_AUTHENTICATOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 13 matching lines...) Expand all
24 class MockAuthenticator : public Authenticator { 24 class MockAuthenticator : public Authenticator {
25 public: 25 public:
26 MockAuthenticator(LoginStatusConsumer* consumer, 26 MockAuthenticator(LoginStatusConsumer* consumer,
27 const std::string& expected_username, 27 const std::string& expected_username,
28 const std::string& expected_password) 28 const std::string& expected_password)
29 : Authenticator(consumer), 29 : Authenticator(consumer),
30 expected_username_(expected_username), 30 expected_username_(expected_username),
31 expected_password_(expected_password) { 31 expected_password_(expected_password) {
32 } 32 }
33 33
34 virtual bool CompleteLogin(Profile* profile, 34 virtual void CompleteLogin(Profile* profile,
35 const std::string& username, 35 const std::string& username,
36 const std::string& password); 36 const std::string& password);
37 37
38 // Returns true after posting task to UI thread to call OnLoginSuccess(). 38 virtual void AuthenticateToLogin(Profile* profile,
39 // This is called on the FILE thread now, so we need to do this.
40 virtual bool AuthenticateToLogin(Profile* profile,
41 const std::string& username, 39 const std::string& username,
42 const std::string& password, 40 const std::string& password,
43 const std::string& login_token, 41 const std::string& login_token,
44 const std::string& login_captcha); 42 const std::string& login_captcha);
45 43
46 virtual bool AuthenticateToUnlock(const std::string& username, 44 virtual void AuthenticateToUnlock(const std::string& username,
47 const std::string& password); 45 const std::string& password);
48 46
49 virtual void LoginOffTheRecord(); 47 virtual void LoginOffTheRecord();
50 48
51 virtual void OnLoginSuccess( 49 virtual void OnLoginSuccess(
52 const GaiaAuthConsumer::ClientLoginResult& credentials, 50 const GaiaAuthConsumer::ClientLoginResult& credentials,
53 bool request_pending); 51 bool request_pending);
54 52
55 virtual void OnLoginFailure(const LoginFailure& failure); 53 virtual void OnLoginFailure(const LoginFailure& failure);
56 54
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 std::string expected_password_; 133 std::string expected_password_;
136 std::string auth_token_; 134 std::string auth_token_;
137 chromeos::BackgroundView* background_view_; 135 chromeos::BackgroundView* background_view_;
138 136
139 DISALLOW_COPY_AND_ASSIGN(MockLoginUtils); 137 DISALLOW_COPY_AND_ASSIGN(MockLoginUtils);
140 }; 138 };
141 139
142 } // namespace chromeos 140 } // namespace chromeos
143 141
144 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ 142 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/google_authenticator.cc ('k') | chrome/browser/chromeos/login/mock_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698