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

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

Issue 168823004: Fix crash with --load-extension for extensions with plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit_tests (load_extension_crash) Created 6 years, 10 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/ui/extensions/extension_install_ui_default.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/unpacked_installer.cc
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index ec4b96b6e4e43ad517b1e8ec9050d95385d6c946..1bd715f22a4c27352913cf613b7114c84a8da636 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/callback.h"
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -15,6 +16,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/permissions_updater.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/api/plugins/plugins_handler.h"
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/extensions/extension_l10n_util.h"
@@ -68,6 +70,17 @@ SimpleExtensionLoadPrompt::~SimpleExtensionLoadPrompt() {
}
void SimpleExtensionLoadPrompt::ShowPrompt() {
+ std::string confirm = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kAppsGalleryInstallAutoConfirmForTests);
+ if (confirm == "accept") {
+ InstallUIProceed();
+ return;
+ }
+ if (confirm == "cancel") {
+ InstallUIAbort(false);
+ return;
+ }
+
install_ui_->ConfirmInstall(
this,
extension_.get(),
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/extension_install_ui_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698