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

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

Issue 2299203004: Attempt to repair corrupt enterprise policy force-installed extensions (Closed)
Patch Set: fix chromeos compile problem Created 4 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/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index cfd8ba1316b94777c6c2c993b93f40956a8acbfb..6aa190b7bf547c4e3c28688afb0244f479adfa08 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -206,8 +206,10 @@ bool ExtensionService::OnExternalExtensionUpdateUrlFound(
// Already installed. Skip this install if the current location has
lazyboy 2016/09/02 19:21:53 Add comment to reflect the new checks you've added
asargent_no_longer_on_chrome 2016/09/09 03:30:44 Done.
// higher priority than |info.download_location|.
Manifest::Location current = extension->location();
- if (current ==
- Manifest::GetHigherPriorityLocation(current, info.download_location)) {
+ if (!pending_extension_manager_.IsPolicyReinstallExpected(
+ info.extension_id) &&
+ current == Manifest::GetHigherPriorityLocation(
+ current, info.download_location)) {
return false;
}
// Otherwise, overwrite the current installation.
@@ -909,6 +911,7 @@ void ExtensionService::DisableExtension(const std::string& extension_id,
// can be uninstalled by the browser if the user sets extension-specific
// preferences.
if (extension && !(disable_reasons & Extension::DISABLE_RELOAD) &&
+ !(disable_reasons & Extension::DISABLE_CORRUPTED) &&
!(disable_reasons & Extension::DISABLE_UPDATE_REQUIRED_BY_POLICY) &&
!system_->management_policy()->UserMayModifySettings(extension,
nullptr) &&

Powered by Google App Engine
This is Rietveld 408576698