summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_install_ui.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-28 07:39:58 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-28 07:39:58 +0000
commite0e1c03462c961ab09faf4c6a1a99a356788eb56 (patch)
treebfc3363a16155f780d69301f5436899120f9d362 /chrome/browser/extensions/extension_install_ui.cc
parent8ca27e633c6054b225944605ef3bc50524fac44b (diff)
downloadchromium_src-e0e1c03462c961ab09faf4c6a1a99a356788eb56.zip
chromium_src-e0e1c03462c961ab09faf4c6a1a99a356788eb56.tar.gz
chromium_src-e0e1c03462c961ab09faf4c6a1a99a356788eb56.tar.bz2
Remove install dialog for themes when off-store installs are enabled.
There's not supposed to be a prompt here. TBR=yoz@chromium.org Review URL: https://chromiumcodereview.appspot.com/10442052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_install_ui.cc')
-rw-r--r--chrome/browser/extensions/extension_install_ui.cc22
1 files changed, 13 insertions, 9 deletions
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc
index bd6b961..eddb98e 100644
--- a/chrome/browser/extensions/extension_install_ui.cc
+++ b/chrome/browser/extensions/extension_install_ui.cc
@@ -35,6 +35,7 @@
#include "chrome/common/extensions/extension_icon_set.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/extension_resource.h"
+#include "chrome/common/extensions/extension_switch_utils.h"
#include "chrome/common/extensions/url_pattern.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/notification_service.h"
@@ -318,16 +319,19 @@ void ExtensionInstallUI::ConfirmInstall(Delegate* delegate,
delegate_ = delegate;
prompt_type_ = INSTALL_PROMPT;
- // In the Web Store, we special-case themes to not show any confirm UI.
- // Instead they are immediately installed, and then we show an infobar (see
- // OnInstallSuccess) to allow the user to revert if they don't like it.
+ // We special-case themes to not show any confirm UI. Instead they are
+ // immediately installed, and then we show an infobar (see OnInstallSuccess)
+ // to allow the user to revert if they don't like it.
//
- // We don't do this off-store because we don't want websites to be able to
- // clickjack people into installing themes. Even though it's not dangerous, it
- // would be annoying.
- if (extension->from_webstore() && extension->is_theme()) {
- delegate->InstallUIProceed();
- return;
+ // We don't do this in the case where off-store extension installs are
+ // disabled because in that case, we don't show the dangerous download UI, so
+ // we need the UI confirmation.
+ if (extension->is_theme()) {
+ if (extension->from_webstore() ||
+ extensions::switch_utils::IsOffStoreInstallEnabled()) {
+ delegate->InstallUIProceed();
+ return;
+ }
}
LoadImageIfNeeded();