Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1407)

Unified Diff: chrome/common/extensions/extension.cc

Issue 10049006: Add OAuth2 scopes to the ExtensionPermissionSet and granted permissions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_permission_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 521628f312158a5c28ae2aae8f1f19ef006e4718..4c24c3e50a3ba0b995ca7dfb56867c7c67e6a6c3 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -241,6 +241,13 @@ Extension::TtsVoice::~TtsVoice() {}
Extension::OAuth2Info::OAuth2Info() {}
Extension::OAuth2Info::~OAuth2Info() {}
+ExtensionOAuth2Scopes Extension::OAuth2Info::GetScopesAsSet() {
+ ExtensionOAuth2Scopes result;
+ std::copy(scopes.begin(), scopes.end(),
+ std::inserter(result, result.begin()));
+ return result;
+}
+
Extension::ExtensionKeybinding::ExtensionKeybinding() {}
Extension::ExtensionKeybinding::~ExtensionKeybinding() {}
@@ -3065,9 +3072,9 @@ bool Extension::InitFromValue(int flags, string16* error) {
}
runtime_data_.SetActivePermissions(new ExtensionPermissionSet(
- this, api_permissions, host_permissions));
+ this, api_permissions, host_permissions, oauth2_info_.GetScopesAsSet()));
required_permission_set_ = new ExtensionPermissionSet(
- this, api_permissions, host_permissions);
+ this, api_permissions, host_permissions, oauth2_info_.GetScopesAsSet());
optional_permission_set_ = new ExtensionPermissionSet(
optional_api_permissions, optional_host_permissions, URLPatternSet());
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_permission_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698