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

Side by Side Diff: ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.h

Issue 2670843003: Removes unnecessary mock methods in fake identity service (Closed)
Patch Set: override Created 3 years, 10 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
« no previous file with comments | « no previous file | ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(
46 void(ChromeIdentity* identity, 46 ChromeIdentity* identity,
47 const std::string& client_id, 47 const std::string& client_id,
48 const std::string& client_secret, 48 const std::string& client_secret,
49 const std::set<std::string>& scopes, 49 const std::set<std::string>& scopes,
50 const ios::AccessTokenCallback& callback)); 50 const ios::AccessTokenCallback& callback) override;
51 51
52 MOCK_METHOD2(GetAvatarForIdentity, 52 virtual void GetAvatarForIdentity(ChromeIdentity* identity,
53 void(ChromeIdentity* identity, GetAvatarCallback callback)); 53 GetAvatarCallback callback) override;
54 54
55 MOCK_METHOD1(GetCachedAvatarForIdentity, UIImage*(ChromeIdentity* identity)); 55 virtual UIImage* GetCachedAvatarForIdentity(
56 ChromeIdentity* identity) override;
56 57
57 MOCK_METHOD2(GetHostedDomainForIdentity, 58 virtual void GetHostedDomainForIdentity(
58 void(ChromeIdentity* identity, 59 ChromeIdentity* identity,
59 GetHostedDomainCallback callback)); 60 GetHostedDomainCallback callback) override;
60 61
61 MOCK_METHOD1(GetMDMDeviceStatus, 62 MOCK_METHOD1(GetMDMDeviceStatus,
62 ios::MDMDeviceStatus(NSDictionary* user_info)); 63 ios::MDMDeviceStatus(NSDictionary* user_info));
63 64
64 MOCK_METHOD3(HandleMDMNotification, 65 MOCK_METHOD3(HandleMDMNotification,
65 bool(ChromeIdentity* identity, 66 bool(ChromeIdentity* identity,
66 NSDictionary* user_info, 67 NSDictionary* user_info,
67 ios::MDMStatusCallback callback)); 68 ios::MDMStatusCallback callback));
68 69
69 // Sets up the mock methods for integration tests. 70 // Sets up the mock methods for integration tests.
70 void SetUpForIntegrationTests(); 71 void SetUpForIntegrationTests();
71 72
72 // Adds the identities given their name. 73 // Adds the identities given their name.
73 void AddIdentities(NSArray* identitiesNames); 74 void AddIdentities(NSArray* identitiesNames);
74 75
75 // Adds |identity| to the available identities. 76 // Adds |identity| to the available identities.
76 void AddIdentity(ChromeIdentity* identity); 77 void AddIdentity(ChromeIdentity* identity);
77 78
78 private: 79 private:
79 base::scoped_nsobject<NSMutableArray> identities_; 80 base::scoped_nsobject<NSMutableArray> identities_;
80 }; 81 };
81 82
82 } // namespace ios 83 } // namespace ios
83 84
84 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVIC E_H_ 85 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVIC E_H_
OLDNEW
« no previous file with comments | « no previous file | ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698