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

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

Issue 252593003: Improve UI for unpacked extensions failing to load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android fix Created 6 years, 8 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 1a41314a5c92d070d3baec247d5a7d8590a3c9dc..867c183b49e87872f8567ad848ee85534bf9cdc6 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -285,32 +285,19 @@ void UnpackedInstaller::LoadWithFileAccess(int flags) {
return;
}
- // The installation prompt is about to be shown, which means we're past the
- // point of detecting installation errors. We can now safely remove the retry
- // handler that listens for them.
- BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&UnpackedInstaller::UnregisterLoadRetryListener, this));
-
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
base::Bind(&UnpackedInstaller::ShowInstallPrompt, this));
}
-void UnpackedInstaller::UnregisterLoadRetryListener() {
- CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (!service_weak_.get())
- return;
- service_weak_->NotifyLoadRetry(false, extension_path_);
-}
-
void UnpackedInstaller::ReportExtensionLoadError(const std::string &error) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (!service_weak_.get())
- return;
- service_weak_->ReportExtensionLoadError(extension_path_, error, true);
+ if (!on_failure_callback_.is_null())
+ on_failure_callback_.Run(extension_path_, error);
+
+ if (service_weak_.get())
+ service_weak_->ReportExtensionLoadError(extension_path_, error);
}
void UnpackedInstaller::ConfirmInstall() {
« no previous file with comments | « chrome/browser/extensions/unpacked_installer.h ('k') | chrome/browser/resources/extensions/extension_code.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698