diff options
author | dcheng <dcheng@chromium.org> | 2014-10-21 04:24:56 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-21 11:25:34 +0000 |
commit | 00ea022b81af00857b352bae68d4ba2eb3e1493b (patch) | |
tree | b5e3e536a25f154ab5410d611736832c11b2cfad /components/signin | |
parent | 0b0885ca539071e7864061fde54c7345a0fd2aae (diff) | |
download | chromium_src-00ea022b81af00857b352bae68d4ba2eb3e1493b.zip chromium_src-00ea022b81af00857b352bae68d4ba2eb3e1493b.tar.gz chromium_src-00ea022b81af00857b352bae68d4ba2eb3e1493b.tar.bz2 |
Standardize usage of virtual/override/final in components/
BUG=417463
TBR=blundell@chromium.org
Review URL: https://codereview.chromium.org/666133002
Cr-Commit-Position: refs/heads/master@{#300456}
Diffstat (limited to 'components/signin')
21 files changed, 146 insertions, 167 deletions
diff --git a/components/signin/core/browser/about_signin_internals.h b/components/signin/core/browser/about_signin_internals.h index 94fca77..c7e264c 100644 --- a/components/signin/core/browser/about_signin_internals.h +++ b/components/signin/core/browser/about_signin_internals.h @@ -48,7 +48,7 @@ class AboutSigninInternals AboutSigninInternals(ProfileOAuth2TokenService* token_service, SigninManagerBase* signin_manager); - virtual ~AboutSigninInternals(); + ~AboutSigninInternals() override; // Each instance of SigninInternalsUI adds itself as an observer to be // notified of all updates that AboutSigninInternals receives. @@ -59,18 +59,18 @@ class AboutSigninInternals void RefreshSigninPrefs(); // SigninManager::SigninDiagnosticsObserver implementation. - virtual void NotifySigninValueChanged( + void NotifySigninValueChanged( const signin_internals_util::UntimedSigninStatusField& field, const std::string& value) override; - virtual void NotifySigninValueChanged( + void NotifySigninValueChanged( const signin_internals_util::TimedSigninStatusField& field, const std::string& value) override; void Initialize(SigninClient* client); // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // Returns a dictionary of values in signin_status_ for use in // about:signin-internals. The values are formatted as shown - @@ -93,19 +93,17 @@ class AboutSigninInternals void GetCookieAccountsAsync(); // OAuth2TokenService::DiagnosticsObserver implementations. - virtual void OnAccessTokenRequested( + void OnAccessTokenRequested( const std::string& account_id, const std::string& consumer_id, const OAuth2TokenService::ScopeSet& scopes) override; - virtual void OnFetchAccessTokenComplete( - const std::string& account_id, - const std::string& consumer_id, - const OAuth2TokenService::ScopeSet& scopes, - GoogleServiceAuthError error, - base::Time expiration_time) override; - virtual void OnTokenRemoved(const std::string& account_id, - const OAuth2TokenService::ScopeSet& scopes) - override; + void OnFetchAccessTokenComplete(const std::string& account_id, + const std::string& consumer_id, + const OAuth2TokenService::ScopeSet& scopes, + GoogleServiceAuthError error, + base::Time expiration_time) override; + void OnTokenRemoved(const std::string& account_id, + const OAuth2TokenService::ScopeSet& scopes) override; void OnRefreshTokenReceived(std::string status); void OnAuthenticationResultReceived(std::string status); @@ -174,9 +172,8 @@ class AboutSigninInternals // Overriden from GaiaAuthConsumer. - virtual void OnListAccountsSuccess(const std::string& data) override; - virtual void OnListAccountsFailure(const GoogleServiceAuthError& error) - override; + void OnListAccountsSuccess(const std::string& data) override; + void OnListAccountsFailure(const GoogleServiceAuthError& error) override; // Callback for ListAccounts. Once the email addresses are fetched from GAIA, // they are pushed to the signin_internals_ui. diff --git a/components/signin/core/browser/account_reconcilor.h b/components/signin/core/browser/account_reconcilor.h index 2b7f5ac..7d3caf4 100644 --- a/components/signin/core/browser/account_reconcilor.h +++ b/components/signin/core/browser/account_reconcilor.h @@ -41,7 +41,7 @@ class AccountReconcilor : public KeyedService, AccountReconcilor(ProfileOAuth2TokenService* token_service, SigninManagerBase* signin_manager, SigninClient* client); - virtual ~AccountReconcilor(); + ~AccountReconcilor() override; void Initialize(bool start_reconcile_if_tokens_available); @@ -51,7 +51,7 @@ class AccountReconcilor : public KeyedService, void OnNewProfileManagementFlagChanged(bool new_flag_status); // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // Add or remove observers for the merge session notification. void AddMergeSessionObserver(MergeSessionHelper::Observer* observer); @@ -138,24 +138,22 @@ class AccountReconcilor : public KeyedService, void OnCookieChanged(const net::CanonicalCookie* cookie); // Overriden from GaiaAuthConsumer. - virtual void OnListAccountsSuccess(const std::string& data) override; - virtual void OnListAccountsFailure(const GoogleServiceAuthError& error) - override; + void OnListAccountsSuccess(const std::string& data) override; + void OnListAccountsFailure(const GoogleServiceAuthError& error) override; // Overriden from MergeSessionHelper::Observer. - virtual void MergeSessionCompleted(const std::string& account_id, - const GoogleServiceAuthError& error) - override; + void MergeSessionCompleted(const std::string& account_id, + const GoogleServiceAuthError& error) override; // Overriden from OAuth2TokenService::Observer. - virtual void OnEndBatchChanges() override; + void OnEndBatchChanges() override; // Overriden from SigninManagerBase::Observer. - virtual void GoogleSigninSucceeded(const std::string& account_id, - const std::string& username, - const std::string& password) override; - virtual void GoogleSignedOut(const std::string& account_id, - const std::string& username) override; + void GoogleSigninSucceeded(const std::string& account_id, + const std::string& username, + const std::string& password) override; + void GoogleSignedOut(const std::string& account_id, + const std::string& username) override; void MayBeDoNextListAccounts(); diff --git a/components/signin/core/browser/account_service_flag_fetcher.h b/components/signin/core/browser/account_service_flag_fetcher.h index 0ef6cd3..1ee6ee3 100644 --- a/components/signin/core/browser/account_service_flag_fetcher.h +++ b/components/signin/core/browser/account_service_flag_fetcher.h @@ -48,30 +48,28 @@ class AccountServiceFlagFetcher : public GaiaAuthConsumer, const ResultCallback& callback); // Destructing the object before the callback is called cancels the request. - virtual ~AccountServiceFlagFetcher(); + ~AccountServiceFlagFetcher() override; private: void Start(); void StartFetchingOAuth2AccessToken(); // Overridden from OAuth2TokenService::Observer: - virtual void OnRefreshTokenAvailable(const std::string& account_id) override; - virtual void OnRefreshTokensLoaded() override; + void OnRefreshTokenAvailable(const std::string& account_id) override; + void OnRefreshTokensLoaded() override; // Overridden from OAuth2TokenService::Consumer: - virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, - const std::string& access_token, - const base::Time& expiration_time) override; - virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, - const GoogleServiceAuthError& error) override; + void OnGetTokenSuccess(const OAuth2TokenService::Request* request, + const std::string& access_token, + const base::Time& expiration_time) override; + void OnGetTokenFailure(const OAuth2TokenService::Request* request, + const GoogleServiceAuthError& error) override; // Overridden from GaiaAuthConsumer: - virtual void OnClientLoginSuccess(const ClientLoginResult& result) override; - virtual void OnClientLoginFailure(const GoogleServiceAuthError& error) - override; - virtual void OnGetUserInfoSuccess(const UserInfoMap& data) override; - virtual void OnGetUserInfoFailure(const GoogleServiceAuthError& error) - override; + void OnClientLoginSuccess(const ClientLoginResult& result) override; + void OnClientLoginFailure(const GoogleServiceAuthError& error) override; + void OnGetUserInfoSuccess(const UserInfoMap& data) override; + void OnGetUserInfoFailure(const GoogleServiceAuthError& error) override; const std::string account_id_; ProfileOAuth2TokenService* token_service_; diff --git a/components/signin/core/browser/account_tracker_service.cc b/components/signin/core/browser/account_tracker_service.cc index 2c5f2cb..714c452 100644 --- a/components/signin/core/browser/account_tracker_service.cc +++ b/components/signin/core/browser/account_tracker_service.cc @@ -32,24 +32,24 @@ class AccountInfoFetcher : public OAuth2TokenService::Consumer, net::URLRequestContextGetter* request_context_getter, AccountTrackerService* service, const std::string& account_id); - virtual ~AccountInfoFetcher(); + ~AccountInfoFetcher() override; const std::string& account_id() { return account_id_; } void Start(); // OAuth2TokenService::Consumer implementation. - virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, - const std::string& access_token, - const base::Time& expiration_time) override; - virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, - const GoogleServiceAuthError& error) override; + void OnGetTokenSuccess(const OAuth2TokenService::Request* request, + const std::string& access_token, + const base::Time& expiration_time) override; + void OnGetTokenFailure(const OAuth2TokenService::Request* request, + const GoogleServiceAuthError& error) override; // gaia::GaiaOAuthClient::Delegate implementation. - virtual void OnGetUserInfoResponse( + void OnGetUserInfoResponse( scoped_ptr<base::DictionaryValue> user_info) override; - virtual void OnOAuthError() override; - virtual void OnNetworkError(int response_code) override; + void OnOAuthError() override; + void OnNetworkError(int response_code) override; private: OAuth2TokenService* token_service_; diff --git a/components/signin/core/browser/account_tracker_service.h b/components/signin/core/browser/account_tracker_service.h index d973d1c..a6f403e 100644 --- a/components/signin/core/browser/account_tracker_service.h +++ b/components/signin/core/browser/account_tracker_service.h @@ -56,10 +56,10 @@ class AccountTrackerService : public KeyedService, }; AccountTrackerService(); - virtual ~AccountTrackerService(); + ~AccountTrackerService() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; void AddObserver(Observer* observer); void RemoveObserver(Observer* observer); @@ -91,8 +91,8 @@ class AccountTrackerService : public KeyedService, void OnUserInfoFetchFailure(AccountInfoFetcher* fetcher); // OAuth2TokenService::Observer implementation. - virtual void OnRefreshTokenAvailable(const std::string& account_id) override; - virtual void OnRefreshTokenRevoked(const std::string& account_id) override; + void OnRefreshTokenAvailable(const std::string& account_id) override; + void OnRefreshTokenRevoked(const std::string& account_id) override; struct AccountState { AccountInfo info; diff --git a/components/signin/core/browser/account_tracker_service_unittest.cc b/components/signin/core/browser/account_tracker_service_unittest.cc index 8b340dc..64b83b0 100644 --- a/components/signin/core/browser/account_tracker_service_unittest.cc +++ b/components/signin/core/browser/account_tracker_service_unittest.cc @@ -98,7 +98,7 @@ std::string Str(const std::vector<TrackingEvent>& events) { class AccountTrackerObserver : public AccountTrackerService::Observer { public: AccountTrackerObserver() {} - virtual ~AccountTrackerObserver() {} + ~AccountTrackerObserver() override {} void Clear(); void SortEventsByUser(); @@ -113,10 +113,8 @@ class AccountTrackerObserver : public AccountTrackerService::Observer { private: // AccountTrackerService::Observer implementation - virtual void OnAccountUpdated( - const AccountTrackerService::AccountInfo& ids) override; - virtual void OnAccountRemoved( - const AccountTrackerService::AccountInfo& ids) override; + void OnAccountUpdated(const AccountTrackerService::AccountInfo& ids) override; + void OnAccountRemoved(const AccountTrackerService::AccountInfo& ids) override; testing::AssertionResult CheckEvents( const std::vector<TrackingEvent>& events); diff --git a/components/signin/core/browser/fake_auth_status_provider.h b/components/signin/core/browser/fake_auth_status_provider.h index 7254179..ce2cca9 100644 --- a/components/signin/core/browser/fake_auth_status_provider.h +++ b/components/signin/core/browser/fake_auth_status_provider.h @@ -14,7 +14,7 @@ class FakeAuthStatusProvider : public SigninErrorController::AuthStatusProvider { public: explicit FakeAuthStatusProvider(SigninErrorController* error); - virtual ~FakeAuthStatusProvider(); + ~FakeAuthStatusProvider() override; // Sets the auth error that this provider reports to SigninErrorController. // Also notifies SigninErrorController via AuthStatusChanged(). @@ -27,9 +27,9 @@ class FakeAuthStatusProvider } // AuthStatusProvider implementation. - virtual std::string GetAccountId() const override; - virtual std::string GetUsername() const override; - virtual GoogleServiceAuthError GetAuthStatus() const override; + std::string GetAccountId() const override; + std::string GetUsername() const override; + GoogleServiceAuthError GetAuthStatus() const override; private: SigninErrorController* error_provider_; diff --git a/components/signin/core/browser/mutable_profile_oauth2_token_service.cc b/components/signin/core/browser/mutable_profile_oauth2_token_service.cc index 98c92b0..6813351 100644 --- a/components/signin/core/browser/mutable_profile_oauth2_token_service.cc +++ b/components/signin/core/browser/mutable_profile_oauth2_token_service.cc @@ -47,11 +47,11 @@ class MutableProfileOAuth2TokenService::RevokeServerRefreshToken public: RevokeServerRefreshToken(MutableProfileOAuth2TokenService* token_service, const std::string& account_id); - virtual ~RevokeServerRefreshToken(); + ~RevokeServerRefreshToken() override; private: // GaiaAuthConsumer overrides: - virtual void OnOAuth2RevokeTokenCompleted() override; + void OnOAuth2RevokeTokenCompleted() override; MutableProfileOAuth2TokenService* token_service_; GaiaAuthFetcher fetcher_; diff --git a/components/signin/core/browser/mutable_profile_oauth2_token_service.h b/components/signin/core/browser/mutable_profile_oauth2_token_service.h index e7db6a2..a06efba 100644 --- a/components/signin/core/browser/mutable_profile_oauth2_token_service.h +++ b/components/signin/core/browser/mutable_profile_oauth2_token_service.h @@ -20,17 +20,16 @@ class MutableProfileOAuth2TokenService : public ProfileOAuth2TokenService, public WebDataServiceConsumer { public: // ProfileOAuth2TokenService overrides. - virtual void Shutdown() override; - virtual std::vector<std::string> GetAccounts() override; + void Shutdown() override; + std::vector<std::string> GetAccounts() override; // The below three methods should be called only on the thread on which this // object was created. - virtual void LoadCredentials(const std::string& primary_account_id) override; - virtual void UpdateCredentials(const std::string& account_id, - const std::string& refresh_token) override; - virtual void RevokeAllCredentials() override; - virtual bool RefreshTokenIsAvailable(const std::string& account_id) const - override; + void LoadCredentials(const std::string& primary_account_id) override; + void UpdateCredentials(const std::string& account_id, + const std::string& refresh_token) override; + void RevokeAllCredentials() override; + bool RefreshTokenIsAvailable(const std::string& account_id) const override; // Revokes credentials related to |account_id|. void RevokeCredentials(const std::string& account_id); @@ -41,7 +40,7 @@ class MutableProfileOAuth2TokenService : public ProfileOAuth2TokenService, AccountInfo(ProfileOAuth2TokenService* token_service, const std::string& account_id, const std::string& refresh_token); - virtual ~AccountInfo(); + ~AccountInfo() override; const std::string& refresh_token() const { return refresh_token_; } void set_refresh_token(const std::string& token) { @@ -51,9 +50,9 @@ class MutableProfileOAuth2TokenService : public ProfileOAuth2TokenService, void SetLastAuthError(const GoogleServiceAuthError& error); // SigninErrorController::AuthStatusProvider implementation. - virtual std::string GetAccountId() const override; - virtual std::string GetUsername() const override; - virtual GoogleServiceAuthError GetAuthStatus() const override; + std::string GetAccountId() const override; + std::string GetUsername() const override; + GoogleServiceAuthError GetAuthStatus() const override; private: ProfileOAuth2TokenService* token_service_; @@ -72,19 +71,19 @@ class MutableProfileOAuth2TokenService : public ProfileOAuth2TokenService, friend class MutableProfileOAuth2TokenServiceTest; MutableProfileOAuth2TokenService(); - virtual ~MutableProfileOAuth2TokenService(); + ~MutableProfileOAuth2TokenService() override; // OAuth2TokenService implementation. - virtual OAuth2AccessTokenFetcher* CreateAccessTokenFetcher( + OAuth2AccessTokenFetcher* CreateAccessTokenFetcher( const std::string& account_id, net::URLRequestContextGetter* getter, OAuth2AccessTokenConsumer* consumer) override; - virtual net::URLRequestContextGetter* GetRequestContext() override; + net::URLRequestContextGetter* GetRequestContext() override; // Updates the internal cache of the result from the most-recently-completed // auth request (used for reporting errors to the user). - virtual void UpdateAuthError(const std::string& account_id, - const GoogleServiceAuthError& error) override; + void UpdateAuthError(const std::string& account_id, + const GoogleServiceAuthError& error) override; virtual std::string GetRefreshToken(const std::string& account_id) const; @@ -103,9 +102,8 @@ class MutableProfileOAuth2TokenService : public ProfileOAuth2TokenService, CanonicalizeAccountId); // WebDataServiceConsumer implementation: - virtual void OnWebDataServiceRequestDone( - WebDataServiceBase::Handle handle, - const WDTypedResult* result) override; + void OnWebDataServiceRequestDone(WebDataServiceBase::Handle handle, + const WDTypedResult* result) override; // Loads credentials into in memory stucture. void LoadAllCredentialsIntoMemory( diff --git a/components/signin/core/browser/mutable_profile_oauth2_token_service_unittest.cc b/components/signin/core/browser/mutable_profile_oauth2_token_service_unittest.cc index b7e9a3a..d53f427 100644 --- a/components/signin/core/browser/mutable_profile_oauth2_token_service_unittest.cc +++ b/components/signin/core/browser/mutable_profile_oauth2_token_service_unittest.cc @@ -65,21 +65,17 @@ class MutableProfileOAuth2TokenServiceTest } // OAuth2TokenService::Observer implementation. - virtual void OnRefreshTokenAvailable(const std::string& account_id) override { + void OnRefreshTokenAvailable(const std::string& account_id) override { ++token_available_count_; } - virtual void OnRefreshTokenRevoked(const std::string& account_id) override { + void OnRefreshTokenRevoked(const std::string& account_id) override { ++token_revoked_count_; } - virtual void OnRefreshTokensLoaded() override { ++tokens_loaded_count_; } + void OnRefreshTokensLoaded() override { ++tokens_loaded_count_; } - virtual void OnStartBatchChanges() override { - ++start_batch_changes_; - } + void OnStartBatchChanges() override { ++start_batch_changes_; } - virtual void OnEndBatchChanges() override { - ++end_batch_changes_; - } + void OnEndBatchChanges() override { ++end_batch_changes_; } void ResetObserverCounts() { token_available_count_ = 0; diff --git a/components/signin/core/browser/profile_oauth2_token_service.h b/components/signin/core/browser/profile_oauth2_token_service.h index fbc1fcc..13210c1 100644 --- a/components/signin/core/browser/profile_oauth2_token_service.h +++ b/components/signin/core/browser/profile_oauth2_token_service.h @@ -37,16 +37,16 @@ class SigninClient; class ProfileOAuth2TokenService : public OAuth2TokenService, public KeyedService { public: - virtual ~ProfileOAuth2TokenService(); + ~ProfileOAuth2TokenService() override; // Initializes this token service with the SigninClient. virtual void Initialize(SigninClient* client); // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // Lists account IDs of all accounts with a refresh token. - virtual std::vector<std::string> GetAccounts() override; + std::vector<std::string> GetAccounts() override; // Loads credentials from a backing persistent store to make them available // after service is used between profile restarts. @@ -85,13 +85,12 @@ class ProfileOAuth2TokenService : public OAuth2TokenService, // concrete class. // Simply returns NULL and should be overriden by subsclasses. - virtual net::URLRequestContextGetter* GetRequestContext() override; + net::URLRequestContextGetter* GetRequestContext() override; // Updates the internal cache of the result from the most-recently-completed // auth request (used for reporting errors to the user). - virtual void UpdateAuthError( - const std::string& account_id, - const GoogleServiceAuthError& error) override; + void UpdateAuthError(const std::string& account_id, + const GoogleServiceAuthError& error) override; // Validate that the account_id argument is valid. This method DCHECKs // when invalid. diff --git a/components/signin/core/browser/signin_account_id_helper.cc b/components/signin/core/browser/signin_account_id_helper.cc index 8570e11..a4c7ab8e 100644 --- a/components/signin/core/browser/signin_account_id_helper.cc +++ b/components/signin/core/browser/signin_account_id_helper.cc @@ -20,19 +20,19 @@ class SigninAccountIdHelper::GaiaIdFetcher ProfileOAuth2TokenService* token_service, SigninManagerBase* signin_manager, SigninAccountIdHelper* signin_account_id_helper); - virtual ~GaiaIdFetcher(); + ~GaiaIdFetcher() override; // OAuth2TokenService::Consumer implementation. - virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, - const std::string& access_token, - const base::Time& expiration_time) override; - virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, - const GoogleServiceAuthError& error) override; + void OnGetTokenSuccess(const OAuth2TokenService::Request* request, + const std::string& access_token, + const base::Time& expiration_time) override; + void OnGetTokenFailure(const OAuth2TokenService::Request* request, + const GoogleServiceAuthError& error) override; // gaia::GaiaOAuthClient::Delegate implementation. - virtual void OnGetUserIdResponse(const std::string& gaia_id) override; - virtual void OnOAuthError() override; - virtual void OnNetworkError(int response_code) override; + void OnGetUserIdResponse(const std::string& gaia_id) override; + void OnOAuthError() override; + void OnNetworkError(int response_code) override; private: void Start(); diff --git a/components/signin/core/browser/signin_account_id_helper.h b/components/signin/core/browser/signin_account_id_helper.h index 680d463..8c93896 100644 --- a/components/signin/core/browser/signin_account_id_helper.h +++ b/components/signin/core/browser/signin_account_id_helper.h @@ -24,14 +24,14 @@ class SigninAccountIdHelper : public SigninManagerBase::Observer, SigninAccountIdHelper(SigninClient* client, ProfileOAuth2TokenService* token_service, SigninManagerBase* signin_manager); - virtual ~SigninAccountIdHelper(); + ~SigninAccountIdHelper() override; // SigninManagerBase::Observer: - virtual void GoogleSignedOut(const std::string& account_id, - const std::string& username) override; + void GoogleSignedOut(const std::string& account_id, + const std::string& username) override; // OAuth2TokenService::Observer: - virtual void OnRefreshTokenAvailable(const std::string& account_id) override; + void OnRefreshTokenAvailable(const std::string& account_id) override; // Disables network requests for testing to avoid messing up with irrelevant // tests. diff --git a/components/signin/core/browser/signin_client.h b/components/signin/core/browser/signin_client.h index 5043ab1..7a48a0b 100644 --- a/components/signin/core/browser/signin_client.h +++ b/components/signin/core/browser/signin_client.h @@ -38,7 +38,7 @@ class SigninClient : public KeyedService { typedef base::CallbackList<void(const net::CanonicalCookie* cookie)> CookieChangedCallbackList; - virtual ~SigninClient() {} + ~SigninClient() override {} // Gets the preferences associated with the client. virtual PrefService* GetPrefs() = 0; diff --git a/components/signin/core/browser/signin_manager.h b/components/signin/core/browser/signin_manager.h index 320872e..57f3813 100644 --- a/components/signin/core/browser/signin_manager.h +++ b/components/signin/core/browser/signin_manager.h @@ -64,7 +64,7 @@ class SigninManager : public SigninManagerBase { static const char kChromeSigninEffectiveSite[]; SigninManager(SigninClient* client, ProfileOAuth2TokenService* token_service); - virtual ~SigninManager(); + ~SigninManager() override; // Returns true if the username is allowed based on the policy string. static bool IsUsernameAllowedByPolicy(const std::string& username, @@ -93,8 +93,8 @@ class SigninManager : public SigninManagerBase { // On platforms where SigninManager is responsible for dealing with // invalid username policy updates, we need to check this during // initialization and sign the user out. - virtual void Initialize(PrefService* local_state) override; - virtual void Shutdown() override; + void Initialize(PrefService* local_state) override; + void Shutdown() override; // Invoked from an OAuthTokenFetchedCallback to complete user signin. virtual void CompletePendingSignin(); @@ -104,9 +104,9 @@ class SigninManager : public SigninManagerBase { void OnExternalSigninCompleted(const std::string& username); // Returns true if there's a signin in progress. - virtual bool AuthInProgress() const override; + bool AuthInProgress() const override; - virtual bool IsSigninAllowed() const override; + bool IsSigninAllowed() const override; // Returns true if the passed username is allowed by policy. Virtual for // mocking in tests. diff --git a/components/signin/core/browser/signin_manager_base.h b/components/signin/core/browser/signin_manager_base.h index 11a9f98..d195adc 100644 --- a/components/signin/core/browser/signin_manager_base.h +++ b/components/signin/core/browser/signin_manager_base.h @@ -61,7 +61,7 @@ class SigninManagerBase : public KeyedService { }; SigninManagerBase(SigninClient* client); - virtual ~SigninManagerBase(); + ~SigninManagerBase() override; // If user was signed in, load tokens from DB if available. virtual void Initialize(PrefService* local_state); @@ -109,7 +109,7 @@ class SigninManagerBase : public KeyedService { virtual bool AuthInProgress() const; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // Methods to register or remove observers of signin. void AddObserver(Observer* observer); diff --git a/components/signin/core/browser/signin_oauth_helper.h b/components/signin/core/browser/signin_oauth_helper.h index fa361a1..12de65b 100644 --- a/components/signin/core/browser/signin_oauth_helper.h +++ b/components/signin/core/browser/signin_oauth_helper.h @@ -38,19 +38,16 @@ class SigninOAuthHelper : public GaiaAuthConsumer { const std::string& session_index, const std::string& signin_scoped_device_id, Consumer* consumer); - virtual ~SigninOAuthHelper(); + ~SigninOAuthHelper() override; private: // Overridden from GaiaAuthConsumer. - virtual void OnClientOAuthSuccess(const ClientOAuthResult& result) override; - virtual void OnClientOAuthFailure(const GoogleServiceAuthError& error) - override; - virtual void OnClientLoginSuccess(const ClientLoginResult& result) override; - virtual void OnClientLoginFailure(const GoogleServiceAuthError& error) - override; - virtual void OnGetUserInfoSuccess(const UserInfoMap& data) override; - virtual void OnGetUserInfoFailure(const GoogleServiceAuthError& error) - override; + void OnClientOAuthSuccess(const ClientOAuthResult& result) override; + void OnClientOAuthFailure(const GoogleServiceAuthError& error) override; + void OnClientLoginSuccess(const ClientLoginResult& result) override; + void OnClientLoginFailure(const GoogleServiceAuthError& error) override; + void OnGetUserInfoSuccess(const UserInfoMap& data) override; + void OnGetUserInfoFailure(const GoogleServiceAuthError& error) override; GaiaAuthFetcher gaia_auth_fetcher_; std::string refresh_token_; diff --git a/components/signin/core/browser/signin_tracker.h b/components/signin/core/browser/signin_tracker.h index a45dedf..dfe6ce7 100644 --- a/components/signin/core/browser/signin_tracker.h +++ b/components/signin/core/browser/signin_tracker.h @@ -75,23 +75,22 @@ class SigninTracker : public SigninManagerBase::Observer, AccountReconcilor* account_reconcilor, SigninClient* client, Observer* observer); - virtual ~SigninTracker(); + ~SigninTracker() override; // SigninManagerBase::Observer implementation. - virtual void GoogleSigninFailed(const GoogleServiceAuthError& error) override; + void GoogleSigninFailed(const GoogleServiceAuthError& error) override; // OAuth2TokenService::Observer implementation. - virtual void OnRefreshTokenAvailable(const std::string& account_id) override; - virtual void OnRefreshTokenRevoked(const std::string& account_id) override; + void OnRefreshTokenAvailable(const std::string& account_id) override; + void OnRefreshTokenRevoked(const std::string& account_id) override; private: // Initializes this by adding notifications and observers. void Initialize(); // MergeSessionHelper::Observer implementation. - virtual void MergeSessionCompleted( - const std::string& account_id, - const GoogleServiceAuthError& error) override; + void MergeSessionCompleted(const std::string& account_id, + const GoogleServiceAuthError& error) override; // The classes whose collective signin status we are tracking. ProfileOAuth2TokenService* token_service_; diff --git a/components/signin/core/browser/test_signin_client.h b/components/signin/core/browser/test_signin_client.h index 4df28fa..1538327 100644 --- a/components/signin/core/browser/test_signin_client.h +++ b/components/signin/core/browser/test_signin_client.h @@ -26,33 +26,33 @@ class TestSigninClient : public SigninClient { public: TestSigninClient(); TestSigninClient(PrefService* pref_service); - virtual ~TestSigninClient(); + ~TestSigninClient() override; // SigninClient implementation that is specialized for unit tests. // Returns NULL. // NOTE: This should be changed to return a properly-initalized PrefService // once there is a unit test that requires it. - virtual PrefService* GetPrefs() override; + PrefService* GetPrefs() override; // Returns a pointer to a loaded database. - virtual scoped_refptr<TokenWebData> GetDatabase() override; + scoped_refptr<TokenWebData> GetDatabase() override; // Returns true. - virtual bool CanRevokeCredentials() override; + bool CanRevokeCredentials() override; // Returns empty string. - virtual std::string GetSigninScopedDeviceId() override; + std::string GetSigninScopedDeviceId() override; // Does nothing. - virtual void OnSignedOut() override; + void OnSignedOut() override; // Returns the empty string. - virtual std::string GetProductVersion() override; + std::string GetProductVersion() override; // Returns a TestURLRequestContextGetter or an manually provided // URLRequestContextGetter. - virtual net::URLRequestContextGetter* GetURLRequestContext() override; + net::URLRequestContextGetter* GetURLRequestContext() override; // For testing purposes, can override the TestURLRequestContextGetter created // in the default constructor. @@ -63,23 +63,23 @@ class TestSigninClient : public SigninClient { #endif // Returns true. - virtual bool ShouldMergeSigninCredentialsIntoCookieJar() override; + bool ShouldMergeSigninCredentialsIntoCookieJar() override; // Does nothing. - virtual scoped_ptr<CookieChangedCallbackList::Subscription> - AddCookieChangedCallback(const CookieChangedCallback& callback) override; + scoped_ptr<CookieChangedCallbackList::Subscription> AddCookieChangedCallback( + const CookieChangedCallback& callback) override; #if defined(OS_IOS) ios::FakeProfileOAuth2TokenServiceIOSProvider* GetIOSProviderAsFake(); #endif // SigninClient overrides: - virtual void SetSigninProcess(int host_id) override; - virtual void ClearSigninProcess() override; - virtual bool IsSigninProcess(int host_id) const override; - virtual bool HasSigninProcess() const override; - virtual bool IsFirstRun() const override; - virtual base::Time GetInstallDate() override; + void SetSigninProcess(int host_id) override; + void ClearSigninProcess() override; + bool IsSigninProcess(int host_id) const override; + bool HasSigninProcess() const override; + bool IsFirstRun() const override; + base::Time GetInstallDate() override; private: // Loads the token database. diff --git a/components/signin/core/browser/webdata/token_service_table.h b/components/signin/core/browser/webdata/token_service_table.h index b4a1d8d..8cc7027 100644 --- a/components/signin/core/browser/webdata/token_service_table.h +++ b/components/signin/core/browser/webdata/token_service_table.h @@ -16,16 +16,15 @@ class WebDatabase; class TokenServiceTable : public WebDatabaseTable { public: TokenServiceTable() {} - virtual ~TokenServiceTable() {} + ~TokenServiceTable() override {} // Retrieves the TokenServiceTable* owned by |database|. static TokenServiceTable* FromWebDatabase(WebDatabase* db); - virtual WebDatabaseTable::TypeKey GetTypeKey() const override; - virtual bool CreateTablesIfNecessary() override; - virtual bool IsSyncable() override; - virtual bool MigrateToVersion(int version, - bool* update_compatible_version) override; + WebDatabaseTable::TypeKey GetTypeKey() const override; + bool CreateTablesIfNecessary() override; + bool IsSyncable() override; + bool MigrateToVersion(int version, bool* update_compatible_version) override; // Remove all tokens previously set with SetTokenForService. bool RemoveAllTokens(); diff --git a/components/signin/core/browser/webdata/token_web_data.h b/components/signin/core/browser/webdata/token_web_data.h index e63bde6..a7432af 100644 --- a/components/signin/core/browser/webdata/token_web_data.h +++ b/components/signin/core/browser/webdata/token_web_data.h @@ -59,7 +59,7 @@ class TokenWebData : public WebDataServiceBase { // For unit tests, passes a null callback. TokenWebData(); - virtual ~TokenWebData(); + ~TokenWebData() override; private: scoped_refptr<TokenWebDataBackend> token_backend_; |