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

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

Issue 510943003: Register granting of previously withheld permissions as a permissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Readded init call for unpacked installer 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 | « chrome/browser/extensions/crx_installer_browsertest.cc ('k') | 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 d55c0ce5de7b1abf9d09c79f200776eca8a337b4..810a5195ead2271396386b4a99974fe05bcf14fd 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -151,6 +151,8 @@ 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(
@@ -310,6 +312,7 @@ void UnpackedInstaller::InstallExtension() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
PermissionsUpdater perms_updater(service_weak_->profile());
+ perms_updater.InitializePermissions(extension());
perms_updater.GrantActivePermissions(extension());
service_weak_->OnExtensionInstalled(
« no previous file with comments | « chrome/browser/extensions/crx_installer_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698