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

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: Response to code review by Devlin 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..754bb0bcca1c1af4b862234b6bfa56fd3c0b7ffe 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/extension_management.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/extensions/permissions_updater.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/extensions/extension_install_ui_factory.h"
@@ -258,9 +259,14 @@ int UnpackedInstaller::GetFlags() {
if (prefs->HasAllowFileAccessSetting(id))
allow_file_access = prefs->AllowFileAccess(id);
+ bool installed_by_custodian =
+ extensions::util::WasInstalledByCustodian(id, service_weak_->profile());
+
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