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

Unified Diff: chrome/browser/extensions/unpacked_installer.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: Fix the bug of delegated installs for pre-existing extensions 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/unpacked_installer.cc
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index f812a2f5f368e2391f6404ffb8128699c844337f..bc937bd4579510f671141238e374a90a58977c7c 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -258,9 +258,15 @@ int UnpackedInstaller::GetFlags() {
if (prefs->HasAllowFileAccessSetting(id))
allow_file_access = prefs->AllowFileAccess(id);
+ bool installed_by_custodian = false;
+ if (prefs->HasIsInstalledByCustodianSetting(id))
+ installed_by_custodian = prefs->IsInstalledByCustodian(id);
Marc Treib 2016/06/13 09:37:14 If this is unset, it should default to false anywa
mamir 2016/06/13 11:30:17 Done.
+
int result = Extension::FOLLOW_SYMLINKS_ANYWHERE;
if (allow_file_access)
result |= Extension::ALLOW_FILE_ACCESS;
+ if (installed_by_custodian)
+ result |= Extension::WAS_INSTALLED_BY_CUSTODIAN;
if (require_modern_manifest_version_)
result |= Extension::REQUIRE_MODERN_MANIFEST_VERSION;

Powered by Google App Engine
This is Rietveld 408576698