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

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

Issue 9320021: Fix crash in ExtensionService::InitializePermissions(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add the test data Created 8 years, 11 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/browser/extensions/installed_loader.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/permissions_updater.cc
diff --git a/chrome/browser/extensions/permissions_updater.cc b/chrome/browser/extensions/permissions_updater.cc
index b15352a7161659726172d99a99b216514358e4e7..215b2ec7f0f91a34a062b9f894ef6020885d95e8 100644
--- a/chrome/browser/extensions/permissions_updater.cc
+++ b/chrome/browser/extensions/permissions_updater.cc
@@ -74,9 +74,10 @@ void PermissionsUpdater::RemovePermissions(
void PermissionsUpdater::GrantActivePermissions(const Extension* extension) {
CHECK(extension);
- // We only maintain the granted permissions prefs for extensions that can't
- // silently increase their permissions.
- if (extension->CanSilentlyIncreasePermissions())
+ // We only maintain the granted permissions prefs for INTERNAL and LOAD
+ // extensions.
+ if (extension->location() != Extension::LOAD &&
+ extension->location() != Extension::INTERNAL)
return;
GetExtensionPrefs()->AddGrantedPermissions(
« no previous file with comments | « chrome/browser/extensions/installed_loader.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698