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

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: 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(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_
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