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

Side by Side Diff: components/signin/core/browser/account_service_flag_fetcher.h

Issue 666133002: Standardize usage of virtual/override/final in components/ (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
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 COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_ 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_ 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 30 matching lines...) Expand all
41 const std::vector<std::string>& /* flags */)> 41 const std::vector<std::string>& /* flags */)>
42 ResultCallback; 42 ResultCallback;
43 43
44 // Immediately starts fetching the flags. 44 // Immediately starts fetching the flags.
45 AccountServiceFlagFetcher(const std::string& account_id, 45 AccountServiceFlagFetcher(const std::string& account_id,
46 ProfileOAuth2TokenService* token_service, 46 ProfileOAuth2TokenService* token_service,
47 net::URLRequestContextGetter* request_context, 47 net::URLRequestContextGetter* request_context,
48 const ResultCallback& callback); 48 const ResultCallback& callback);
49 49
50 // Destructing the object before the callback is called cancels the request. 50 // Destructing the object before the callback is called cancels the request.
51 virtual ~AccountServiceFlagFetcher(); 51 ~AccountServiceFlagFetcher() override;
52 52
53 private: 53 private:
54 void Start(); 54 void Start();
55 void StartFetchingOAuth2AccessToken(); 55 void StartFetchingOAuth2AccessToken();
56 56
57 // Overridden from OAuth2TokenService::Observer: 57 // Overridden from OAuth2TokenService::Observer:
58 virtual void OnRefreshTokenAvailable(const std::string& account_id) override; 58 void OnRefreshTokenAvailable(const std::string& account_id) override;
59 virtual void OnRefreshTokensLoaded() override; 59 void OnRefreshTokensLoaded() override;
60 60
61 // Overridden from OAuth2TokenService::Consumer: 61 // Overridden from OAuth2TokenService::Consumer:
62 virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, 62 void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
63 const std::string& access_token, 63 const std::string& access_token,
64 const base::Time& expiration_time) override; 64 const base::Time& expiration_time) override;
65 virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, 65 void OnGetTokenFailure(const OAuth2TokenService::Request* request,
66 const GoogleServiceAuthError& error) override; 66 const GoogleServiceAuthError& error) override;
67 67
68 // Overridden from GaiaAuthConsumer: 68 // Overridden from GaiaAuthConsumer:
69 virtual void OnClientLoginSuccess(const ClientLoginResult& result) override; 69 void OnClientLoginSuccess(const ClientLoginResult& result) override;
70 virtual void OnClientLoginFailure(const GoogleServiceAuthError& error) 70 void OnClientLoginFailure(const GoogleServiceAuthError& error) override;
71 override; 71 void OnGetUserInfoSuccess(const UserInfoMap& data) override;
72 virtual void OnGetUserInfoSuccess(const UserInfoMap& data) override; 72 void OnGetUserInfoFailure(const GoogleServiceAuthError& error) override;
73 virtual void OnGetUserInfoFailure(const GoogleServiceAuthError& error)
74 override;
75 73
76 const std::string account_id_; 74 const std::string account_id_;
77 ProfileOAuth2TokenService* token_service_; 75 ProfileOAuth2TokenService* token_service_;
78 GaiaAuthFetcher gaia_auth_fetcher_; 76 GaiaAuthFetcher gaia_auth_fetcher_;
79 77
80 ResultCallback callback_; 78 ResultCallback callback_;
81 79
82 scoped_ptr<OAuth2TokenService::Request> oauth2_access_token_request_; 80 scoped_ptr<OAuth2TokenService::Request> oauth2_access_token_request_;
83 81
84 DISALLOW_COPY_AND_ASSIGN(AccountServiceFlagFetcher); 82 DISALLOW_COPY_AND_ASSIGN(AccountServiceFlagFetcher);
85 }; 83 };
86 84
87 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_ 85 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_SERVICE_FLAG_FETCHER_H_
OLDNEW
« no previous file with comments | « components/signin/core/browser/account_reconcilor.h ('k') | components/signin/core/browser/account_tracker_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698