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

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

Issue 12704002: Support for auth code based authentication flow for both app and web UI driven flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase4 Created 7 years, 9 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) 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_
7 7
8 #include "chrome/browser/chromeos/login/login_status_consumer.h" 8 #include "chrome/browser/chromeos/login/login_status_consumer.h"
9 #include "chrome/browser/chromeos/login/user.h"
9 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
10 11
11 namespace chromeos { 12 namespace chromeos {
12 13
13 class MockConsumer : public LoginStatusConsumer { 14 class MockConsumer : public LoginStatusConsumer {
14 public: 15 public:
15 MockConsumer(); 16 MockConsumer();
16 virtual ~MockConsumer(); 17 virtual ~MockConsumer();
17 18
18 MOCK_METHOD1(OnLoginFailure, void(const LoginFailure& error)); 19 MOCK_METHOD1(OnLoginFailure, void(const LoginFailure& error));
19 MOCK_METHOD0(OnRetailModeLoginSuccess, void(void)); 20 MOCK_METHOD0(OnRetailModeLoginSuccess, void(void));
20 MOCK_METHOD4(OnLoginSuccess, void( 21 MOCK_METHOD3(OnLoginSuccess, void(
21 const std::string& username, 22 const UserCredentials& credentials,
22 const std::string& password,
23 bool pending_requests, 23 bool pending_requests,
24 bool using_oauth)); 24 bool using_oauth));
25 MOCK_METHOD0(OnOffTheRecordLoginSuccess, void(void)); 25 MOCK_METHOD0(OnOffTheRecordLoginSuccess, void(void));
26 MOCK_METHOD0(OnPasswordChangeDetected, void(void)); 26 MOCK_METHOD0(OnPasswordChangeDetected, void(void));
27 27
28 // The following functions can be used in gmock Invoke() clauses. 28 // The following functions can be used in gmock Invoke() clauses.
29 29
30 // Compatible with LoginStatusConsumer::OnRetailModeLoginSuccess() 30 // Compatible with LoginStatusConsumer::OnRetailModeLoginSuccess()
31 static void OnRetailModeSuccessQuit(); 31 static void OnRetailModeSuccessQuit();
32 static void OnRetailModeSuccessQuitAndFail(); 32 static void OnRetailModeSuccessQuitAndFail();
33 33
34 // Compatible with LoginStatusConsumer::OnOffTheRecordLoginSuccess() 34 // Compatible with LoginStatusConsumer::OnOffTheRecordLoginSuccess()
35 static void OnGuestSuccessQuit(); 35 static void OnGuestSuccessQuit();
36 static void OnGuestSuccessQuitAndFail(); 36 static void OnGuestSuccessQuitAndFail();
37 37
38 // Compatible with LoginStatusConsumer::OnLoginSuccess() 38 // Compatible with LoginStatusConsumer::OnLoginSuccess()
39 static void OnSuccessQuit( 39 static void OnSuccessQuit(
40 const std::string& username, 40 const UserCredentials& credentials,
41 const std::string& password,
42 bool pending_requests, 41 bool pending_requests,
43 bool using_oauth); 42 bool using_oauth);
44 static void OnSuccessQuitAndFail( 43 static void OnSuccessQuitAndFail(
45 const std::string& username, 44 const UserCredentials& credentials,
46 const std::string& password,
47 bool pending_requests, 45 bool pending_requests,
48 bool using_oauth); 46 bool using_oauth);
49 47
50 // Compatible with LoginStatusConsumer::OnLoginFailure() 48 // Compatible with LoginStatusConsumer::OnLoginFailure()
51 static void OnFailQuit(const LoginFailure& error); 49 static void OnFailQuit(const LoginFailure& error);
52 static void OnFailQuitAndFail(const LoginFailure& error); 50 static void OnFailQuitAndFail(const LoginFailure& error);
53 51
54 // Compatible with LoginStatusConsumer::OnPasswordChangeDetected() 52 // Compatible with LoginStatusConsumer::OnPasswordChangeDetected()
55 static void OnMigrateQuit(); 53 static void OnMigrateQuit();
56 static void OnMigrateQuitAndFail(); 54 static void OnMigrateQuitAndFail();
57 }; 55 };
58 56
59 } // namespace chromeos 57 } // namespace chromeos
60 58
61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_ 59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/mock_authenticator.cc ('k') | chrome/browser/chromeos/login/mock_login_status_consumer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698