| Index: chrome/browser/extensions/permissions_updater.cc
|
| ===================================================================
|
| --- chrome/browser/extensions/permissions_updater.cc (revision 176209)
|
| +++ chrome/browser/extensions/permissions_updater.cc (working copy)
|
| @@ -16,6 +16,7 @@
|
| #include "chrome/browser/signin/token_service.h"
|
| #include "chrome/browser/signin/token_service_factory.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| +#include "chrome/common/extensions/api/identity/oauth2_manifest_handler.h"
|
| #include "chrome/common/extensions/api/permissions.h"
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/common/extensions/extension_messages.h"
|
| @@ -50,8 +51,8 @@
|
| TokenServiceFactory::GetForProfile(profile)->
|
| GetOAuth2LoginRefreshToken(),
|
| extension->id(),
|
| - extension->oauth2_info().client_id,
|
| - extension->oauth2_info().scopes,
|
| + extensions::OAuth2Info::GetOAuth2Info(extension)->client_id,
|
| + extensions::OAuth2Info::GetOAuth2Info(extension)->scopes,
|
| OAuth2MintTokenFlow::MODE_RECORD_GRANT))) {
|
| notification_registrar_.Add(this,
|
| chrome::NOTIFICATION_PROFILE_DESTROYED,
|
| @@ -143,8 +144,9 @@
|
| // Only record OAuth grant if:
|
| // 1. The extension has client id and scopes.
|
| // 2. The user is signed in to Chrome.
|
| - const Extension::OAuth2Info& oauth2_info = extension->oauth2_info();
|
| - if (!oauth2_info.client_id.empty() && !oauth2_info.scopes.empty()) {
|
| + const extensions::OAuth2Info* oauth2_info =
|
| + extensions::OAuth2Info::GetOAuth2Info(extension);
|
| + if (!oauth2_info->client_id.empty() && !oauth2_info->scopes.empty()) {
|
| TokenService* token_service = TokenServiceFactory::GetForProfile(
|
| profile_);
|
| if (token_service && token_service->HasOAuthLoginToken()) {
|
|
|