diff options
author | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-13 19:43:33 +0000 |
---|---|---|
committer | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-13 19:43:33 +0000 |
commit | 7e9878b83ce96c45eb060a83eca59e1fa569054d (patch) | |
tree | 29b9481cb5fea1b84732a92c229997226338f066 /chrome/browser/extensions | |
parent | e65251d7ee4a93ad257751edc5254d94f34a7c77 (diff) | |
download | chromium_src-7e9878b83ce96c45eb060a83eca59e1fa569054d.zip chromium_src-7e9878b83ce96c45eb060a83eca59e1fa569054d.tar.gz chromium_src-7e9878b83ce96c45eb060a83eca59e1fa569054d.tar.bz2 |
Add a mode to OAuth2MintTokenFlow that fetches the messages to show to the user.
Change OAuth2MintTokenFlow to use OAuth2ApiCallFlow.
Review URL: https://chromiumcodereview.appspot.com/10012051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r-- | chrome/browser/extensions/api/identity/identity_api.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/extensions/api/identity/identity_api.cc b/chrome/browser/extensions/api/identity/identity_api.cc index 1c8a8c2..bd4c869 100644 --- a/chrome/browser/extensions/api/identity/identity_api.cc +++ b/chrome/browser/extensions/api/identity/identity_api.cc @@ -43,10 +43,16 @@ bool GetAuthTokenFunction::RunImpl() { TokenService* token_service = TokenServiceFactory::GetForProfile(profile()); - flow_.reset( - new OAuth2MintTokenFlow(profile()->GetRequestContext(), this)); - flow_->Start(token_service->GetOAuth2LoginRefreshToken(), - extension->id(), oauth2_info.client_id, oauth2_info.scopes); + flow_.reset(new OAuth2MintTokenFlow( + profile()->GetRequestContext(), + this, + OAuth2MintTokenFlow::Parameters( + token_service->GetOAuth2LoginRefreshToken(), + extension->id(), + oauth2_info.client_id, + oauth2_info.scopes, + OAuth2MintTokenFlow::MODE_MINT_TOKEN_FORCE))); + flow_->Start(); return true; } |