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

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

Issue 2673553003: [ObjC ARC] Converts ios/chrome/browser/ui/history:eg_tests to ARC. (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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 MOCK_METHOD5(GetAccessToken, 45 MOCK_METHOD5(GetAccessToken,
46 void(ChromeIdentity* identity, 46 void(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));
51 51
52 MOCK_METHOD2(GetAvatarForIdentity, 52 MOCK_METHOD2(GetAvatarForIdentity,
53 void(ChromeIdentity* identity, GetAvatarCallback callback)); 53 void(ChromeIdentity* identity, GetAvatarCallback callback));
54 54
55 MOCK_METHOD1(GetCachedAvatarForIdentity, UIImage*(ChromeIdentity* identity)); 55 virtual UIImage* GetCachedAvatarForIdentity(
marq (ping after 24h) 2017/02/03 14:26:14 Add a comment explaining why this can't be mocked
stkhapugin 2017/02/03 15:49:07 I actually made a separate CL where I've addressed
56 ChromeIdentity* identity) override;
56 57
57 MOCK_METHOD2(GetHostedDomainForIdentity, 58 MOCK_METHOD2(GetHostedDomainForIdentity,
58 void(ChromeIdentity* identity, 59 void(ChromeIdentity* identity,
59 GetHostedDomainCallback callback)); 60 GetHostedDomainCallback callback));
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

Powered by Google App Engine
This is Rietveld 408576698