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

Unified Diff: chrome/browser/ui/webui/extensions/extension_loader_handler.cc

Issue 342003005: Show alert failure for reloading unpacked extensions with bad manifest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 6 years, 6 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/ui/webui/extensions/extension_loader_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_loader_handler.cc b/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
index 6e43177a4a3abd3fe57b684c2c362b5012a36f9b..42545b7e120fb816c2d404e0f71f003ec4f6acd9 100644
--- a/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
@@ -31,6 +31,9 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/shell_dialogs/select_file_dialog.h"
+class ExtensionErrorReporter;
Devlin 2014/06/24 22:21:12 Don't need to forward declare classes either forwa
+class ExtensionErrorReporterObserver;
+
namespace extensions {
namespace {
@@ -131,8 +134,10 @@ void ExtensionLoaderHandler::FileHelper::MultiFilesSelected(
ExtensionLoaderHandler::ExtensionLoaderHandler(Profile* profile)
: profile_(profile),
file_helper_(new FileHelper(this)),
- weak_ptr_factory_(this) {
+ weak_ptr_factory_(this),
+ extension_error_reporter_observer_(this) {
DCHECK(profile_);
+ extension_error_reporter_observer_.Add(ExtensionErrorReporter::GetInstance());
}
ExtensionLoaderHandler::~ExtensionLoaderHandler() {
@@ -182,9 +187,6 @@ void ExtensionLoaderHandler::LoadUnpackedExtensionImpl(
const base::FilePath& file_path) {
scoped_refptr<UnpackedInstaller> installer = UnpackedInstaller::Create(
ExtensionSystem::Get(profile_)->extension_service());
- installer->set_on_failure_callback(
- base::Bind(&ExtensionLoaderHandler::OnLoadFailure,
- weak_ptr_factory_.GetWeakPtr()));
// We do our own error handling, so we don't want a load failure to trigger
// a dialog.

Powered by Google App Engine
This is Rietveld 408576698