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

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

Issue 7003098: Start refractoring extension permissions into ExtensionPermissionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: See if rebasing fixes the tests... Created 9 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/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index e772a0f2bcafc2cbb0b499daac4a9247cea6c707..7f76e1dc411b1d46c1da90e277303ca853b15518 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -546,6 +546,13 @@ void CrxInstaller::ReportSuccessFromUIThread() {
if (client_)
client_->OnInstallSuccess(extension_.get(), install_icon_.get());
+ // We update the extension's granted permissions if the user already approved
+ // the install (client_ is non NULL), or we are allowed to install this
+ // silently. We only track granted permissions for INTERNAL extensions.
+ if ((client_ || allow_silent_install_) &&
+ extension_->location() == Extension::INTERNAL)
+ frontend_weak_->GrantPermissions(extension_);
+
// Tell the frontend about the installation and hand off ownership of
// extension_ to it.
frontend_weak_->OnExtensionInstalled(extension_);
« no previous file with comments | « chrome/browser/extensions/convert_web_app_unittest.cc ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698