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

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

Issue 536573003: Add ExtensionManagement based ExternalLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext-2
Patch Set: Created 6 years, 3 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/install_verifier.cc
diff --git a/chrome/browser/extensions/install_verifier.cc b/chrome/browser/extensions/install_verifier.cc
index 7ef862fec0bf7e3e6b92c2be703fd136a5477288..cb60164af6d6b654a3802fe44af9480c7229a850 100644
--- a/chrome/browser/extensions/install_verifier.cc
+++ b/chrome/browser/extensions/install_verifier.cc
@@ -13,6 +13,7 @@
#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
#include "base/stl_util.h"
+#include "chrome/browser/extensions/extension_management.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/install_signer.h"
#include "chrome/common/chrome_switches.h"
@@ -322,21 +323,9 @@ void InstallVerifier::RemoveMany(const ExtensionIdSet& ids) {
}
bool InstallVerifier::AllowedByEnterprisePolicy(const std::string& id) const {
- PrefService* pref_service = prefs_->pref_service();
- if (pref_service->IsManagedPreference(pref_names::kInstallAllowList)) {
- const base::ListValue* whitelist =
- pref_service->GetList(pref_names::kInstallAllowList);
- base::StringValue id_value(id);
- if (whitelist && whitelist->Find(id_value) != whitelist->end())
- return true;
- }
- if (pref_service->IsManagedPreference(pref_names::kInstallForceList)) {
- const base::DictionaryValue* forcelist =
- pref_service->GetDictionary(pref_names::kInstallForceList);
- if (forcelist && forcelist->HasKey(id))
- return true;
- }
- return false;
+ return ExtensionManagementFactory::GetInstance()
+ ->GetForBrowserContext(context_)
Joao da Silva 2014/09/04 12:07:46 ExtensionManagementFactory::GetForBrowserContext
binjin 2014/09/04 14:27:06 Done.
+ ->IsInstallationAllowed(id);
}
std::string InstallVerifier::GetDebugPolicyProviderName() const {

Powered by Google App Engine
This is Rietveld 408576698