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

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

Issue 384423002: [Canceled] Extensions: Add install_flags parameter to ManagementPolicy::UserMayLoad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update tests Created 6 years, 5 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 52dd01a162e61fc6dcf50205686b1e762251e5b2..ad2ea6f79d22c1f41e316bff32bfde1a4601f517 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -37,6 +37,8 @@ namespace {
const char kUnpackedExtensionsBlacklistedError[] =
"Loading of unpacked extensions is disabled by the administrator.";
+const int kInstallFlags = extensions::kInstallFlagInstallImmediately;
+
// Manages an ExtensionInstallPrompt for a particular extension.
class SimpleExtensionLoadPrompt : public ExtensionInstallPrompt::Delegate {
public:
@@ -153,7 +155,8 @@ bool UnpackedInstaller::LoadFromCommandLine(const base::FilePath& path_in,
std::string error;
install_checker_.set_extension(
file_util::LoadExtension(
- extension_path_, Manifest::COMMAND_LINE, GetFlags(), &error).get());
+ extension_path_, Manifest::COMMAND_LINE, GetFlags(), &error).get(),
+ kInstallFlags);
if (!extension() ||
!extension_l10n_util::ValidateExtensionLocales(
@@ -279,7 +282,8 @@ void UnpackedInstaller::LoadWithFileAccess(int flags) {
std::string error;
install_checker_.set_extension(
file_util::LoadExtension(
- extension_path_, Manifest::UNPACKED, flags, &error).get());
+ extension_path_, Manifest::UNPACKED, flags, &error).get(),
+ kInstallFlags);
if (!extension() ||
!extension_l10n_util::ValidateExtensionLocales(
@@ -318,7 +322,7 @@ void UnpackedInstaller::InstallExtension() {
perms_updater.GrantActivePermissions(extension());
service_weak_->OnExtensionInstalled(
- extension(), syncer::StringOrdinal(), kInstallFlagInstallImmediately);
+ extension(), syncer::StringOrdinal(), kInstallFlags);
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698