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

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

Issue 264763002: Support remote installation of extensions and apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: histogram owner Created 6 years, 7 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.h ('k') | chrome/browser/extensions/extension_disabled_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 9a5e4ef6c0adddbe057327a420eb99c1bd36a0f0..e9084fa6e4c2b443e1d2560937465efa06a3667a 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -105,10 +105,9 @@ scoped_refptr<CrxInstaller> CrxInstaller::Create(
return new CrxInstaller(service->AsWeakPtr(), client.Pass(), approval);
}
-CrxInstaller::CrxInstaller(
- base::WeakPtr<ExtensionService> service_weak,
- scoped_ptr<ExtensionInstallPrompt> client,
- const WebstoreInstaller::Approval* approval)
+CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> service_weak,
+ scoped_ptr<ExtensionInstallPrompt> client,
+ const WebstoreInstaller::Approval* approval)
: install_directory_(service_weak->install_directory()),
install_source_(Manifest::INTERNAL),
approved_(false),
@@ -123,6 +122,7 @@ CrxInstaller::CrxInstaller(
client_(client.release()),
apps_require_extension_mime_type_(false),
allow_silent_install_(false),
+ grant_permissions_(true),
install_cause_(extension_misc::INSTALL_CAUSE_UNSET),
creation_flags_(Extension::NO_FLAGS),
off_store_install_allow_reason_(OffStoreInstallDisallowed),
@@ -802,7 +802,7 @@ void CrxInstaller::ReportSuccessFromUIThread() {
// 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.
- if (client_ || allow_silent_install_) {
+ if ((client_ || allow_silent_install_) && grant_permissions_) {
PermissionsUpdater perms_updater(profile());
perms_updater.GrantActivePermissions(extension());
}
« no previous file with comments | « chrome/browser/extensions/crx_installer.h ('k') | chrome/browser/extensions/extension_disabled_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698