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

Unified Diff: chrome/browser/extensions/extension_prefs.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: Fix nit. 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
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index c5f03f2cf9fc4ad1fb707db85bdbc797a70b436b..56d410cbab49c7fa1ec796412ee4b9c4991b8a70 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -11,10 +11,10 @@
#include "chrome/browser/prefs/pref_notifier.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/url_constants.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/url_pattern.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/url_constants.h"
#include "content/public/browser/notification_service.h"
using base::Time;
@@ -587,9 +587,15 @@ bool ExtensionPrefs::SetAlertSystemFirstRun() {
}
bool ExtensionPrefs::IsExtensionAllowedByPolicy(
- const std::string& extension_id) {
+ const std::string& extension_id,
+ Extension::Location location) {
std::string string_value;
+ if (location == Extension::COMPONENT ||
+ location == Extension::EXTERNAL_POLICY_DOWNLOAD) {
+ return true;
+ }
+
const ListValue* blacklist =
prefs_->GetList(prefs::kExtensionInstallDenyList);
if (!blacklist || blacklist->empty())

Powered by Google App Engine
This is Rietveld 408576698