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

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

Issue 8380006: Exempt component and policy-installed extensions from policy blacklist check. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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/extension_prefs.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index c3c6e16f86f3553b2e5ccf26c46a5fe459cefdec..82c122a3b5b03f0bab73b4cafd66229e72f9fc00 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -7,8 +7,8 @@
#include <algorithm>
#include <set>
-#include "base/bind.h"
#include "base/basictypes.h"
+#include "base/bind.h"
#include "base/callback.h"
#include "base/command_line.h"
#include "base/file_util.h"
@@ -91,8 +91,8 @@
#include "content/browser/plugin_service.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/user_metrics.h"
-#include "content/public/browser/notification_service.h"
#include "content/common/pepper_plugin_registry.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
#include "net/base/registry_controlled_domain.h"
@@ -1410,7 +1410,8 @@ void ExtensionService::LoadInstalledExtension(const ExtensionInfo& info,
bool write_to_prefs) {
std::string error;
scoped_refptr<const Extension> extension(NULL);
- if (!extension_prefs_->IsExtensionAllowedByPolicy(info.extension_id)) {
+ if (!extension_prefs_->IsExtensionAllowedByPolicy(info.extension_id,
+ info.extension_location)) {
error = errors::kDisabledByPolicy;
} else if (info.extension_manifest.get()) {
extension = Extension::Create(
@@ -1699,8 +1700,10 @@ void ExtensionService::CheckAdminBlacklist() {
for (ExtensionList::const_iterator iter = extensions_.begin();
iter != extensions_.end(); ++iter) {
const Extension* extension = (*iter);
- if (!extension_prefs_->IsExtensionAllowedByPolicy(extension->id()))
+ if (!extension_prefs_->IsExtensionAllowedByPolicy(extension->id(),
+ extension->location())) {
to_be_removed.push_back(extension->id());
+ }
}
// UnloadExtension will change the extensions_ list. So, we should
@@ -2414,6 +2417,7 @@ void ExtensionService::AddExtension(const Extension* extension) {
void ExtensionService::InitializePermissions(const Extension* extension) {
// If the extension has used the optional permissions API, it will have a
+
Finnur 2011/10/24 15:08:13 I am repulsed by this particular change. The effec
Mattias Nissler (ping if slow) 2011/10/24 15:28:14 lol :) Done.
// custom set of active permissions defined in the extension prefs. Here,
// we update the extension's active permissions based on the prefs.
scoped_refptr<ExtensionPermissionSet> active_permissions =
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698