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

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

Issue 1148323007: [Extensions] Introduce a ScopedExtensionDialogAutoConfirm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ben's Created 5 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
Index: chrome/browser/extensions/unpacked_installer.cc
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index 36368aca93b1c68fb52ecd1cb8c311840d5f9fb5..f83077e1401142d76d0939d85ef2ef2f0fff3ca1 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -19,6 +19,7 @@
#include "chrome/common/extensions/api/plugins/plugins_handler.h"
#include "components/crx_file/id_util.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/browser/extension_dialog_auto_confirm.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/install/extension_install_ui.h"
@@ -79,17 +80,17 @@ SimpleExtensionLoadPrompt::~SimpleExtensionLoadPrompt() {
}
void SimpleExtensionLoadPrompt::ShowPrompt() {
- switch (ExtensionInstallPrompt::g_auto_confirm_for_tests) {
- case ExtensionInstallPrompt::NONE:
+ switch (extensions::ScopedTestDialogAutoConfirm::GetAutoConfirmValue()) {
+ case extensions::ScopedTestDialogAutoConfirm::NONE:
install_ui_->ConfirmInstall(
this,
extension_.get(),
ExtensionInstallPrompt::GetDefaultShowDialogCallback());
break;
- case ExtensionInstallPrompt::ACCEPT:
+ case extensions::ScopedTestDialogAutoConfirm::ACCEPT:
InstallUIProceed();
break;
- case ExtensionInstallPrompt::CANCEL:
+ case extensions::ScopedTestDialogAutoConfirm::CANCEL:
InstallUIAbort(false);
not at google - send to devlin 2015/06/02 08:20:09 could you add a break here?
Devlin 2015/06/10 20:35:13 Why not.
}
}

Powered by Google App Engine
This is Rietveld 408576698