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

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

Issue 11741035: Exclude hosted apps from post-sideload UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 7 years, 12 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 | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 1b68f88763ab69111778886b333160f0a40f02b8..47b7a9c3b7544e464c67af1b56d122fd2da4d5ac 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2996,8 +2996,10 @@ bool ExtensionService::ShouldEnableOnInstall(const Extension* extension) {
if (FeatureSwitch::prompt_for_external_extensions()->IsEnabled()) {
// External extensions are initially disabled. We prompt the user before
- // enabling them.
- if (Extension::IsExternalLocation(extension->location()) &&
+ // enabling them. Hosted apps are excepted because they are not dangerous
+ // (they need to be launched by the user anyway).
+ if (extension->GetType() != Extension::TYPE_HOSTED_APP &&
+ Extension::IsExternalLocation(extension->location()) &&
!extension_prefs_->IsExternalExtensionAcknowledged(extension->id())) {
return false;
}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698