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

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: Latest master Created 6 years, 6 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 32e27aa3b650d8719c099d442b2b3640aabf90a1..7d4a35ef7326678e90bc74e08975c63f41e13280 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) &&
+ 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()));
}
}
}
« no previous file with comments | « chrome/browser/extensions/bundle_installer.cc ('k') | chrome/browser/extensions/extension_gcm_app_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698