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

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

Issue 584313002: Fix crash in UnpackedInstaller::LoadFromCommandLine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/unpacked_installer.cc
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index 810a5195ead2271396386b4a99974fe05bcf14fd..992ebe3fa7e28303c83003094d6fed644bbed6dc 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -151,8 +151,6 @@ bool UnpackedInstaller::LoadFromCommandLine(const base::FilePath& path_in,
install_checker_.set_extension(
file_util::LoadExtension(
extension_path_, Manifest::COMMAND_LINE, GetFlags(), &error).get());
- PermissionsUpdater(service_weak_->profile())
- .InitializePermissions(extension());
if (!extension() ||
!extension_l10n_util::ValidateExtensionLocales(
@@ -161,6 +159,9 @@ bool UnpackedInstaller::LoadFromCommandLine(const base::FilePath& path_in,
return false;
}
+ PermissionsUpdater(
+ service_weak_->profile(), PermissionsUpdater::INIT_FLAG_TRANSIENT)
+ .InitializePermissions(extension());
ShowInstallPrompt();
*extension_id = extension()->id();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698