};
explicit IdentityAPI(content::BrowserContext* context);
- virtual ~IdentityAPI();
+ ~IdentityAPI() override;
// Request serialization queue for getAuthToken.
IdentityMintRequestQueue* mint_queue();
std::string FindAccountKeyByGaiaId(const std::string& gaia_id);
// BrowserContextKeyedAPI implementation.
- virtual void Shutdown() OVERRIDE;
+ void Shutdown() override;
static BrowserContextKeyedAPIFactory<IdentityAPI>* GetFactoryInstance();
// gaia::AccountTracker::Observer implementation:
- virtual void OnAccountAdded(const gaia::AccountIds& ids) OVERRIDE;
- virtual void OnAccountRemoved(const gaia::AccountIds& ids) OVERRIDE;
- virtual void OnAccountSignInChanged(const gaia::AccountIds& ids,
- bool is_signed_in) OVERRIDE;
+ void OnAccountAdded(const gaia::AccountIds& ids) override;
+ void OnAccountRemoved(const gaia::AccountIds& ids) override;
+ void OnAccountSignInChanged(const gaia::AccountIds& ids,
+ bool is_signed_in) override;
void AddShutdownObserver(ShutdownObserver* observer);
void RemoveShutdownObserver(ShutdownObserver* observer);
IdentityGetAccountsFunction();
private:
- virtual ~IdentityGetAccountsFunction();
+ ~IdentityGetAccountsFunction() override;
// UIThreadExtensionFunction implementation.
- virtual ExtensionFunction::ResponseAction Run() OVERRIDE;
+ ExtensionFunction::ResponseAction Run() override;
};
// identity.getAuthToken fetches an OAuth 2 function for the
}
protected:
- virtual ~IdentityGetAuthTokenFunction();
+ ~IdentityGetAuthTokenFunction() override;
// IdentitySigninFlow::Delegate implementation:
- virtual void SigninSuccess() OVERRIDE;
- virtual void SigninFailed() OVERRIDE;
+ void SigninSuccess() override;
+ void SigninFailed() override;
// GaiaWebAuthFlow::Delegate implementation:
- virtual void OnGaiaFlowFailure(GaiaWebAuthFlow::Failure failure,
- GoogleServiceAuthError service_error,
- const std::string& oauth_error) OVERRIDE;
- virtual void OnGaiaFlowCompleted(const std::string& access_token,
- const std::string& expiration) OVERRIDE;
+ void OnGaiaFlowFailure(GaiaWebAuthFlow::Failure failure,
+ GoogleServiceAuthError service_error,
+ const std::string& oauth_error) override;
+ void OnGaiaFlowCompleted(const std::string& access_token,
+ const std::string& expiration) override;
// Starts a login access token request.
virtual void StartLoginAccessTokenRequest();
// 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;
+
+ // Starts a mint token request to GAIA.
+ // Exposed for testing.
+ virtual void StartGaiaRequest(const std::string& login_access_token);
+
+ // Caller owns the returned instance.
+ // Exposed for testing.
+ virtual OAuth2MintTokenFlow* CreateMintTokenFlow();
scoped_ptr<OAuth2TokenService::Request> login_token_request_;
FRIEND_TEST_ALL_PREFIXES(GetAuthTokenFunctionTest, NoninteractiveShutdown);
// ExtensionFunction:
- virtual bool RunAsync() OVERRIDE;
+ bool RunAsync() override;
// Helpers to report async function results to the caller.
void StartAsyncRun();
void CompleteMintTokenFlow();
// IdentityMintRequestQueue::Request implementation:
- virtual void StartMintToken(IdentityMintRequestQueue::MintType type) OVERRIDE;
+ void StartMintToken(IdentityMintRequestQueue::MintType type) override;
// OAuth2MintTokenFlow::Delegate implementation:
- virtual void OnMintTokenSuccess(const std::string& access_token,
- int time_to_live) OVERRIDE;
- virtual void OnMintTokenFailure(
- const GoogleServiceAuthError& error) OVERRIDE;
- virtual void OnIssueAdviceSuccess(
- const IssueAdviceInfo& issue_advice) OVERRIDE;
+ void OnMintTokenSuccess(const std::string& access_token,
+ int time_to_live) override;
+ void OnMintTokenFailure(const GoogleServiceAuthError& error) override;
+ void OnIssueAdviceSuccess(const IssueAdviceInfo& issue_advice) override;
// IdentityAPI::ShutdownObserver implementation:
- virtual void OnShutdown() OVERRIDE;
+ void OnShutdown() override;
#if defined(OS_CHROMEOS)
// Starts a login access token request for device robot account. This method
virtual void StartDeviceLoginAccessTokenRequest();
#endif
- // Starts a mint token request to GAIA.
- void StartGaiaRequest(const std::string& login_access_token);
-
// Methods for invoking UI. Overridable for testing.
virtual void ShowLoginPopup();
virtual void ShowOAuthApprovalDialog(const IssueAdviceInfo& issue_advice);
- // Caller owns the returned instance.
- virtual OAuth2MintTokenFlow* CreateMintTokenFlow(
- const std::string& login_access_token);
// Checks if there is a master login token to mint tokens for the extension.
bool HasLoginToken() const;
IdentityGetProfileUserInfoFunction();
private:
- virtual ~IdentityGetProfileUserInfoFunction();
+ ~IdentityGetProfileUserInfoFunction() override;
// UIThreadExtensionFunction implementation.
- virtual ExtensionFunction::ResponseAction Run() OVERRIDE;
+ ExtensionFunction::ResponseAction Run() override;
};
class IdentityRemoveCachedAuthTokenFunction
IdentityRemoveCachedAuthTokenFunction();
protected:
- virtual ~IdentityRemoveCachedAuthTokenFunction();
+ ~IdentityRemoveCachedAuthTokenFunction() override;
// SyncExtensionFunction implementation:
- virtual bool RunSync() OVERRIDE;
+ bool RunSync() override;
};
class IdentityLaunchWebAuthFlowFunction : public ChromeAsyncExtensionFunction,
void InitFinalRedirectURLPrefixForTest(const std::string& extension_id);
private:
- virtual ~IdentityLaunchWebAuthFlowFunction();
- virtual bool RunAsync() OVERRIDE;
+ ~IdentityLaunchWebAuthFlowFunction() override;
+ bool RunAsync() override;
// WebAuthFlow::Delegate implementation.
- virtual void OnAuthFlowFailure(WebAuthFlow::Failure failure) OVERRIDE;
- virtual void OnAuthFlowURLChange(const GURL& redirect_url) OVERRIDE;
- virtual void OnAuthFlowTitleChange(const std::string& title) OVERRIDE {}
+ void OnAuthFlowFailure(WebAuthFlow::Failure failure) override;
+ void OnAuthFlowURLChange(const GURL& redirect_url) override;
+ void OnAuthFlowTitleChange(const std::string& title) override {}
// Helper to initialize final URL prefix.
void InitFinalRedirectURLPrefix(const std::string& extension_id);