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

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

Issue 904943003: Fixes component extension commands assignment on reload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 ef2d572e69b1588a48ed075f8dfb4d78967b097f..3e3d06a3ec20ebea1b378b45d8d89fe50d2a76ad 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -696,11 +696,12 @@ bool ExtensionService::UninstallExtension(
// we don't do this.
bool external_uninstall =
(reason == extensions::UNINSTALL_REASON_INTERNAL_MANAGEMENT) ||
+ (reason == extensions::UNINSTALL_REASON_COMPONENT_REMOVED) ||
(reason == extensions::UNINSTALL_REASON_REINSTALL) ||
(reason == extensions::UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION) ||
(reason == extensions::UNINSTALL_REASON_ORPHANED_SHARED_MODULE) ||
(reason == extensions::UNINSTALL_REASON_SYNC &&
- extension->was_installed_by_custodian());
+ extension->was_installed_by_custodian());
if (!external_uninstall &&
(!by_policy->UserMayModifySettings(extension.get(), error) ||
by_policy->MustRemainInstalled(extension.get(), error))) {
@@ -1395,7 +1396,7 @@ void ExtensionService::RemoveComponentExtension(
content::Source<Profile>(profile_),
content::Details<const Extension>(extension.get()));
ExtensionRegistry::Get(profile_)->TriggerOnUninstalled(
- extension.get(), extensions::UNINSTALL_REASON_INTERNAL_MANAGEMENT);
+ extension.get(), extensions::UNINSTALL_REASON_COMPONENT_REMOVED);
}
}

Powered by Google App Engine
This is Rietveld 408576698