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

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

Issue 10854009: Extension white and force lists (set by policy) should have priority over auto-updated Google black… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed NULL instead of false Created 8 years, 4 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/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index d6b0d9656d1d7385d2b846bdede06a2bd146e0bb..b0dcaa2ce45bd67f0fb246969d23cb51a6f30659 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1126,7 +1126,10 @@ void ExtensionService::UpdateExtensionBlacklist(
for (ExtensionSet::const_iterator iter = extensions_.begin();
iter != extensions_.end(); ++iter) {
const Extension* extension = (*iter);
- if (blacklist_set.find(extension->id()) != blacklist_set.end()) {
+
+ // Do not use blacklist_set as this does not take into account whitelist and
+ // forcelist policies.
+ if (extension_prefs_->IsExtensionBlacklisted(extension->id())) {
Mattias Nissler (ping if slow) 2012/08/08 08:08:37 should call into extensions::ManagementPolicy here
to_be_removed.push_back(extension->id());
}
}
@@ -1168,7 +1171,11 @@ void ExtensionService::CheckAdminBlacklist() {
for (ExtensionSet::const_iterator iter = extensions_.begin();
iter != extensions_.end(); ++iter) {
const Extension* extension = (*iter);
- if (!system_->management_policy()->UserMayLoad(extension, NULL)) {
+
+ // Blacklisting status may have changed in the result of policy change so
+ // check it too.
+ if (!system_->management_policy()->UserMayLoad(extension, NULL) ||
+ extension_prefs_->IsExtensionBlacklisted(extension->id())) {
Mattias Nissler (ping if slow) 2012/08/08 08:08:37 same here.
to_be_removed.push_back(extension->id());
}
}

Powered by Google App Engine
This is Rietveld 408576698