Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H _ | 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H _ |
| 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H _ | 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVICE_H _ |
| 7 | 7 |
| 8 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" | 8 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 | 35 |
| 36 bool IsValidIdentity(ChromeIdentity* identity) const override; | 36 bool IsValidIdentity(ChromeIdentity* identity) const override; |
| 37 ChromeIdentity* GetIdentityWithGaiaID( | 37 ChromeIdentity* GetIdentityWithGaiaID( |
| 38 const std::string& gaia_id) const override; | 38 const std::string& gaia_id) const override; |
| 39 bool HasIdentities() const override; | 39 bool HasIdentities() const override; |
| 40 NSArray* GetAllIdentities() const override; | 40 NSArray* GetAllIdentities() const override; |
| 41 NSArray* GetAllIdentitiesSortedForDisplay() const override; | 41 NSArray* GetAllIdentitiesSortedForDisplay() const override; |
| 42 void ForgetIdentity(ChromeIdentity* identity, | 42 void ForgetIdentity(ChromeIdentity* identity, |
| 43 ForgetIdentityCallback callback) override; | 43 ForgetIdentityCallback callback) override; |
| 44 | 44 |
| 45 MOCK_METHOD5(GetAccessToken, | 45 virtual void GetAccessToken(ChromeIdentity* identity, |
|
sdefresne
2017/02/03 09:17:05
This is a method overridden from ChromeIdentitySer
stkhapugin
2017/02/03 10:12:33
Done.
| |
| 46 void(ChromeIdentity* identity, | 46 const std::string& client_id, |
| 47 const std::string& client_id, | 47 const std::string& client_secret, |
| 48 const std::string& client_secret, | 48 const std::set<std::string>& scopes, |
| 49 const std::set<std::string>& scopes, | 49 const ios::AccessTokenCallback& callback); |
| 50 const ios::AccessTokenCallback& callback)); | |
| 51 | 50 |
| 52 MOCK_METHOD2(GetAvatarForIdentity, | 51 virtual void GetAvatarForIdentity(ChromeIdentity* identity, |
|
sdefresne
2017/02/03 09:17:05
ditto
stkhapugin
2017/02/03 10:12:34
Done.
| |
| 53 void(ChromeIdentity* identity, GetAvatarCallback callback)); | 52 GetAvatarCallback callback); |
| 54 | 53 |
| 55 MOCK_METHOD1(GetCachedAvatarForIdentity, UIImage*(ChromeIdentity* identity)); | 54 virtual UIImage* GetCachedAvatarForIdentity(ChromeIdentity* identity); |
|
sdefresne
2017/02/03 09:17:05
ditto
stkhapugin
2017/02/03 10:12:33
Done.
| |
| 56 | 55 |
| 57 MOCK_METHOD2(GetHostedDomainForIdentity, | 56 virtual void GetHostedDomainForIdentity(ChromeIdentity* identity, |
|
sdefresne
2017/02/03 09:17:06
ditto
stkhapugin
2017/02/03 10:12:34
Done.
| |
| 58 void(ChromeIdentity* identity, | 57 GetHostedDomainCallback callback); |
| 59 GetHostedDomainCallback callback)); | |
| 60 | 58 |
| 61 MOCK_METHOD1(GetMDMDeviceStatus, | 59 MOCK_METHOD1(GetMDMDeviceStatus, |
| 62 ios::MDMDeviceStatus(NSDictionary* user_info)); | 60 ios::MDMDeviceStatus(NSDictionary* user_info)); |
| 63 | 61 |
| 64 MOCK_METHOD3(HandleMDMNotification, | 62 MOCK_METHOD3(HandleMDMNotification, |
| 65 bool(ChromeIdentity* identity, | 63 bool(ChromeIdentity* identity, |
| 66 NSDictionary* user_info, | 64 NSDictionary* user_info, |
| 67 ios::MDMStatusCallback callback)); | 65 ios::MDMStatusCallback callback)); |
| 68 | 66 |
| 69 // Sets up the mock methods for integration tests. | 67 // Sets up the mock methods for integration tests. |
| 70 void SetUpForIntegrationTests(); | 68 void SetUpForIntegrationTests(); |
| 71 | 69 |
| 72 // Adds the identities given their name. | 70 // Adds the identities given their name. |
| 73 void AddIdentities(NSArray* identitiesNames); | 71 void AddIdentities(NSArray* identitiesNames); |
| 74 | 72 |
| 75 // Adds |identity| to the available identities. | 73 // Adds |identity| to the available identities. |
| 76 void AddIdentity(ChromeIdentity* identity); | 74 void AddIdentity(ChromeIdentity* identity); |
| 77 | 75 |
| 78 private: | 76 private: |
| 79 base::scoped_nsobject<NSMutableArray> identities_; | 77 base::scoped_nsobject<NSMutableArray> identities_; |
| 80 }; | 78 }; |
| 81 | 79 |
| 82 } // namespace ios | 80 } // namespace ios |
| 83 | 81 |
| 84 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVIC E_H_ | 82 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVIC E_H_ |
| OLD | NEW |