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

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

Issue 2409743002: Fix force policy installation of the removed pref-installed extension (Closed)
Patch Set: Created 4 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_service_unittest.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/pending_extension_manager.cc
diff --git a/chrome/browser/extensions/pending_extension_manager.cc b/chrome/browser/extensions/pending_extension_manager.cc
index 515f01e3a019d665048fdfb5875701054cef59d4..36038b92f83039747805229bc92149a9311f202c 100644
--- a/chrome/browser/extensions/pending_extension_manager.cc
+++ b/chrome/browser/extensions/pending_extension_manager.cc
@@ -194,8 +194,12 @@ bool PendingExtensionManager::AddFromExternalUpdateUrl(
// If the new location has higher priority than the location of an existing
// extension, let the update process overwrite the existing extension.
} else {
- if (ExtensionPrefs::Get(context_)->IsExternalExtensionUninstalled(id))
+ // Skip the installation if the extension was removed by the user and it's
+ // not specified to be force-installed through the policy.
+ if (!Manifest::IsPolicyLocation(location) &&
+ ExtensionPrefs::Get(context_)->IsExternalExtensionUninstalled(id)) {
return false;
+ }
if (extension) {
LOG(DFATAL) << "Trying to add extension " << id
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698