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

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
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 521628f312158a5c28ae2aae8f1f19ef006e4718..908a1525f92e00ef3d46481784c48e5484cbdaaa 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -240,6 +240,12 @@ Extension::TtsVoice::~TtsVoice() {}
Extension::OAuth2Info::OAuth2Info() {}
Extension::OAuth2Info::~OAuth2Info() {}
+ExtensionOAuth2Scopes Extension::OAuth2Info::GetScopesAsSet() {
Yoyo Zhou 2012/04/24 23:16:36 nit: newline above this
jstritar 2012/04/24 23:33:34 Done.
+ ExtensionOAuth2Scopes result;
+ std::copy(scopes.begin(), scopes.end(),
+ std::inserter(result, result.begin()));
+ return result;
+}
Extension::ExtensionKeybinding::ExtensionKeybinding() {}
Extension::ExtensionKeybinding::~ExtensionKeybinding() {}
@@ -3065,9 +3071,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());

Powered by Google App Engine
This is Rietveld 408576698