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

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

Issue 2920853006: Removes usage of signin APIs that return scoped_nsobjects. (Closed)
Patch Set: Reparent Created 3 years, 6 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"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 12
13 @class NSMutableArray; 13 @class NSMutableArray;
14 14
15 namespace ios { 15 namespace ios {
16 16
17 // A fake ChromeIdentityService used for testing. 17 // A fake ChromeIdentityService used for testing.
18 class FakeChromeIdentityService : public ChromeIdentityService { 18 class FakeChromeIdentityService : public ChromeIdentityService {
19 public: 19 public:
20 FakeChromeIdentityService(); 20 FakeChromeIdentityService();
21 virtual ~FakeChromeIdentityService(); 21 virtual ~FakeChromeIdentityService();
22 22
23 // Convenience method that returns the instance of 23 // Convenience method that returns the instance of
24 // |FakeChromeIdentityService| from the ChromeBrowserProvider. 24 // |FakeChromeIdentityService| from the ChromeBrowserProvider.
25 static FakeChromeIdentityService* GetInstanceFromChromeProvider(); 25 static FakeChromeIdentityService* GetInstanceFromChromeProvider();
26 26
27 // ChromeIdentityService implementation. 27 // ChromeIdentityService implementation.
28 base::scoped_nsobject<UINavigationController> NewAccountDetails( 28 UINavigationController* CreateAccountDetailsController(
29 ChromeIdentity* identity, 29 ChromeIdentity* identity,
30 id<ChromeIdentityBrowserOpener> browser_opener) override; 30 id<ChromeIdentityBrowserOpener> browser_opener) override;
31 base::scoped_nsobject<ChromeIdentityInteractionManager> 31 ChromeIdentityInteractionManager* CreateChromeIdentityInteractionManager(
32 NewChromeIdentityInteractionManager(
33 ios::ChromeBrowserState* browser_state, 32 ios::ChromeBrowserState* browser_state,
34 id<ChromeIdentityInteractionManagerDelegate> delegate) const override; 33 id<ChromeIdentityInteractionManagerDelegate> delegate) const override;
35 34
36 bool IsValidIdentity(ChromeIdentity* identity) const override; 35 bool IsValidIdentity(ChromeIdentity* identity) const override;
37 ChromeIdentity* GetIdentityWithGaiaID( 36 ChromeIdentity* GetIdentityWithGaiaID(
38 const std::string& gaia_id) const override; 37 const std::string& gaia_id) const override;
39 bool HasIdentities() const override; 38 bool HasIdentities() const override;
40 NSArray* GetAllIdentities() const override; 39 NSArray* GetAllIdentities() const override;
41 NSArray* GetAllIdentitiesSortedForDisplay() const override; 40 NSArray* GetAllIdentitiesSortedForDisplay() const override;
42 void ForgetIdentity(ChromeIdentity* identity, 41 void ForgetIdentity(ChromeIdentity* identity,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // is unknown. 79 // is unknown.
81 void RemoveIdentity(ChromeIdentity* identity); 80 void RemoveIdentity(ChromeIdentity* identity);
82 81
83 private: 82 private:
84 base::scoped_nsobject<NSMutableArray> identities_; 83 base::scoped_nsobject<NSMutableArray> identities_;
85 }; 84 };
86 85
87 } // namespace ios 86 } // namespace ios
88 87
89 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVIC E_H_ 88 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SIGNIN_FAKE_CHROME_IDENTITY_SERVIC E_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698