Index: chrome/browser/extensions/extension_service.cc |
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc |
index ac49c1dfce81fa2e55807059079e5a576445332f..6e7931ad5230d92a8c1802b8a279999c4b87ba2f 100644 |
--- a/chrome/browser/extensions/extension_service.cc |
+++ b/chrome/browser/extensions/extension_service.cc |
@@ -544,7 +544,10 @@ bool ExtensionService::UpdateExtension(const std::string& id, |
if (pending_extension_info) { |
installer->set_install_source(pending_extension_info->install_source()); |
if (pending_extension_info->install_silently()) |
- installer->set_allow_silent_install(true); |
+ installer->set_allow_silent_install( |
+ pending_extension_info->remote_install() |
+ ? CrxInstaller::SILENTLY_DONT_GRANT |
+ : CrxInstaller::GRANT_SILENTLY); |
creation_flags = pending_extension_info->creation_flags(); |
if (pending_extension_info->mark_acknowledged()) |
AcknowledgeExternalExtension(id); |
@@ -1494,11 +1497,13 @@ void ExtensionService::AddExtension(const Extension* extension) { |
content::Source<Profile>(profile_), |
content::Details<const Extension>(extension)); |
- // Show the extension disabled error if a permissions increase was the |
- // only reason it was disabled. |
- if (extension_prefs_->GetDisableReasons(extension->id()) == |
- Extension::DISABLE_PERMISSIONS_INCREASE) { |
- extensions::AddExtensionDisabledError(this, extension); |
+ // Show the extension disabled error if a permissions increase or a remote |
+ // installation is the reason it was disabled, and no other reasons exist. |
Yoyo Zhou
2014/05/01 22:53:44
It shouldn't be possible to have PERMISSIONS_INCRE
Marijn Kruisselbrink
2014/05/05 20:45:36
Currently any remotely installed extension with no
Yoyo Zhou
2014/05/05 22:35:17
It's too bad we don't have a good notifications ar
not at google - send to devlin
2014/05/09 14:58:52
Good question. Let's go with "whatever is easiest"
Marijn Kruisselbrink
2014/05/14 23:30:02
Since the conclusion seems to have been that we sh
|
+ int reasons = extension_prefs_->GetDisableReasons(extension->id()); |
+ const int kReasonMask = Extension::DISABLE_PERMISSIONS_INCREASE | |
+ Extension::DISABLE_REMOTE_INSTALL; |
+ if (reasons & kReasonMask && !(reasons & ~kReasonMask)) { |
+ extensions::AddExtensionDisabledError(this, extension, reasons); |
} |
} else if (reloading) { |
// Replace the old extension with the new version. |