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

Side by Side Diff: ios/public/test/fake_profile_oauth2_token_service_ios_provider.h

Issue 635523002: Replacing the OVERRIDE with override and FINAL with final in /src/ios (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « ios/consumer/base/supports_user_data_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TEST_MOCK_PROFILE_OAUTH2_TOKEN_SERVICE_PROVIDER_IOS_H_ 5 #ifndef IOS_TEST_MOCK_PROFILE_OAUTH2_TOKEN_SERVICE_PROVIDER_IOS_H_
6 #define IOS_TEST_MOCK_PROFILE_OAUTH2_TOKEN_SERVICE_PROVIDER_IOS_H_ 6 #define IOS_TEST_MOCK_PROFILE_OAUTH2_TOKEN_SERVICE_PROVIDER_IOS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "ios/public/provider/components/signin/browser/profile_oauth2_token_ser vice_ios_provider.h" 13 #include "ios/public/provider/components/signin/browser/profile_oauth2_token_ser vice_ios_provider.h"
14 14
15 namespace ios { 15 namespace ios {
16 16
17 // Mock class of ProfileOAuth2TokenServiceIOSProvider for testing. 17 // Mock class of ProfileOAuth2TokenServiceIOSProvider for testing.
18 class FakeProfileOAuth2TokenServiceIOSProvider 18 class FakeProfileOAuth2TokenServiceIOSProvider
19 : public ProfileOAuth2TokenServiceIOSProvider { 19 : public ProfileOAuth2TokenServiceIOSProvider {
20 public: 20 public:
21 FakeProfileOAuth2TokenServiceIOSProvider(); 21 FakeProfileOAuth2TokenServiceIOSProvider();
22 virtual ~FakeProfileOAuth2TokenServiceIOSProvider(); 22 virtual ~FakeProfileOAuth2TokenServiceIOSProvider();
23 23
24 // ProfileOAuth2TokenServiceIOSProvider 24 // ProfileOAuth2TokenServiceIOSProvider
25 virtual void InitializeSharedAuthentication() OVERRIDE; 25 virtual void InitializeSharedAuthentication() override;
26 26
27 virtual void GetAccessToken(const std::string& account_id, 27 virtual void GetAccessToken(const std::string& account_id,
28 const std::string& client_id, 28 const std::string& client_id,
29 const std::string& client_secret, 29 const std::string& client_secret,
30 const std::set<std::string>& scopes, 30 const std::set<std::string>& scopes,
31 const AccessTokenCallback& callback) OVERRIDE; 31 const AccessTokenCallback& callback) override;
32 32
33 virtual std::vector<std::string> GetAllAccountIds() OVERRIDE; 33 virtual std::vector<std::string> GetAllAccountIds() override;
34 34
35 virtual AuthenticationErrorCategory GetAuthenticationErrorCategory( 35 virtual AuthenticationErrorCategory GetAuthenticationErrorCategory(
36 NSError* error) const OVERRIDE; 36 NSError* error) const override;
37 37
38 // Methods to configure this fake provider. 38 // Methods to configure this fake provider.
39 void AddAccount(const std::string& account_id); 39 void AddAccount(const std::string& account_id);
40 void SetAccounts(const std::vector<std::string>& accounts); 40 void SetAccounts(const std::vector<std::string>& accounts);
41 void ClearAccounts(); 41 void ClearAccounts();
42 42
43 // Issues access token responses. 43 // Issues access token responses.
44 void IssueAccessTokenForAllRequests(); 44 void IssueAccessTokenForAllRequests();
45 void IssueAccessTokenErrorForAllRequests(); 45 void IssueAccessTokenErrorForAllRequests();
46 46
47 private: 47 private:
48 typedef std::pair<std::string, AccessTokenCallback> AccessTokenRequest; 48 typedef std::pair<std::string, AccessTokenCallback> AccessTokenRequest;
49 49
50 std::vector<std::string> accounts_; 50 std::vector<std::string> accounts_;
51 std::vector<AccessTokenRequest> requests_; 51 std::vector<AccessTokenRequest> requests_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(FakeProfileOAuth2TokenServiceIOSProvider); 53 DISALLOW_COPY_AND_ASSIGN(FakeProfileOAuth2TokenServiceIOSProvider);
54 }; 54 };
55 55
56 } // namespace ios 56 } // namespace ios
57 57
58 #endif // IOS_TEST_PROVIDER_CHROME_BROWSER_SIGNIN_MOCK_PROFILE_OAUTH2_TOKEN_SER VICE_PROVIDER_IOS_H_ 58 #endif // IOS_TEST_PROVIDER_CHROME_BROWSER_SIGNIN_MOCK_PROFILE_OAUTH2_TOKEN_SER VICE_PROVIDER_IOS_H_
OLDNEW
« no previous file with comments | « ios/consumer/base/supports_user_data_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698