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

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

Issue 2054773002: Replace the WAS_INSTALLED_BY_CUSTODIAN creation flag with a pref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to code review by Marc Created 4 years, 6 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 93c7c595a9608db4cb0025a10e1f7202aef4240b..11e2c4228c621db198c271a2e219d1ac6b5e1abe 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -548,7 +548,6 @@ bool ExtensionService::UpdateExtension(const extensions::CRXFileInfo& file,
installer->set_expected_version(expected_version,
false /* fail_install_if_unexpected */);
}
- creation_flags = pending_extension_info->creation_flags();
if (pending_extension_info->mark_acknowledged())
external_install_manager_->AcknowledgeExternalExtension(id);
} else if (extension) {
@@ -579,9 +578,6 @@ bool ExtensionService::UpdateExtension(const extensions::CRXFileInfo& file,
if (extension && extension->was_installed_by_oem())
creation_flags |= Extension::WAS_INSTALLED_BY_OEM;
- if (extension && extension->was_installed_by_custodian())
- creation_flags |= Extension::WAS_INSTALLED_BY_CUSTODIAN;
-
if (extension)
installer->set_do_not_sync(extension_prefs_->DoNotSync(id));
@@ -732,7 +728,7 @@ bool ExtensionService::UninstallExtension(
(reason == extensions::UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION) ||
(reason == extensions::UNINSTALL_REASON_ORPHANED_SHARED_MODULE) ||
(reason == extensions::UNINSTALL_REASON_SYNC &&
- extension->was_installed_by_custodian());
+ extensions::util::WasInstalledByCustodian(extension->id(), profile_));
if (!external_uninstall &&
(!by_policy->UserMayModifySettings(extension.get(), error) ||
by_policy->MustRemainInstalled(extension.get(), error))) {

Powered by Google App Engine
This is Rietveld 408576698