Chromium Code Reviews| Index: chrome/browser/extensions/permissions_updater.cc |
| =================================================================== |
| --- chrome/browser/extensions/permissions_updater.cc (revision 177049) |
| +++ chrome/browser/extensions/permissions_updater.cc (working copy) |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -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, |
|
Devlin
2013/01/17 22:53:05
nit: don't need to have extensions:: prefix in thi
SanjoyPal
2013/01/18 02:08:50
Done.
|
| + extensions::OAuth2Info::GetOAuth2Info(extension).scopes, |
| OAuth2MintTokenFlow::MODE_RECORD_GRANT))) { |
| notification_registrar_.Add(this, |
| chrome::NOTIFICATION_PROFILE_DESTROYED, |
| @@ -143,7 +144,8 @@ |
| // 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(); |
| + 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_); |