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

Unified Diff: chrome/browser/extensions/crx_installer.cc

Issue 309533007: Refactor PermissionsData pt1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index b77769ff455590584b3e6232c284f5dacda26f6b..3271900b8b4385119d78aadaa8a7beac62d80109 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -296,8 +296,10 @@ CrxInstallerError CrxInstaller::AllowInstall(const Extension* extension) {
WebstoreInstaller::MANIFEST_CHECK_LEVEL_NONE) {
// To skip manifest checking, the extension must be a shared module
// and not request any permissions.
- if (SharedModuleInfo::IsSharedModule(extension) &&
- PermissionsData::GetActivePermissions(extension)->IsEmpty()) {
+ if (SharedModuleInfo::IsSharedModule(extension) &&
not at google - send to devlin 2014/06/02 23:20:06 here
Devlin 2014/06/03 15:28:21 Not done. No speed advantage and given that we ref
+ PermissionsData::ForExtension(extension)
+ ->active_permissions()
+ ->IsEmpty()) {
valid = true;
}
} else {
@@ -313,11 +315,12 @@ CrxInstallerError CrxInstaller::AllowInstall(const Extension* extension) {
&error);
if (error.empty()) {
scoped_refptr<const PermissionSet> expected_permissions =
- PermissionsData::GetActivePermissions(dummy_extension.get());
+ PermissionsData::ForExtension(dummy_extension)
+ ->active_permissions();
valid = !(PermissionMessageProvider::Get()->IsPrivilegeIncrease(
- expected_permissions,
- PermissionsData::GetActivePermissions(extension),
- extension->GetType()));
+ expected_permissions,
+ PermissionsData::ForExtension(extension)->active_permissions(),
+ extension->GetType()));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698