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

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

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
« no previous file with comments | « chrome/browser/extensions/installed_loader.cc ('k') | chrome/browser/extensions/unpacked_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/unpacked_installer.h
diff --git a/chrome/browser/extensions/unpacked_installer.h b/chrome/browser/extensions/unpacked_installer.h
index 73924a6f6797c27bcef1bb3576d1e4e3f1daf7bc..5d2414987efbdf4d76ae0f56cedccd55d036cad3 100644
--- a/chrome/browser/extensions/unpacked_installer.h
+++ b/chrome/browser/extensions/unpacked_installer.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -29,6 +30,9 @@ class RequirementsChecker;
class UnpackedInstaller
: public base::RefCountedThreadSafe<UnpackedInstaller> {
public:
+ typedef base::Callback<void(const base::FilePath&, const std::string&)>
+ OnFailureCallback;
+
static scoped_refptr<UnpackedInstaller> Create(
ExtensionService* extension_service);
@@ -61,6 +65,10 @@ class UnpackedInstaller
require_modern_manifest_version_ = val;
}
+ void set_on_failure_callback(const OnFailureCallback& callback) {
+ on_failure_callback_ = callback;
+ }
+
private:
friend class base::RefCountedThreadSafe<UnpackedInstaller>;
@@ -117,6 +125,9 @@ class UnpackedInstaller
// version.
bool require_modern_manifest_version_;
+ // An optional callback to set in order to be notified of failure.
+ OnFailureCallback on_failure_callback_;
+
// Gives access to common methods and data of an extension installer.
ExtensionInstaller installer_;
« no previous file with comments | « chrome/browser/extensions/installed_loader.cc ('k') | chrome/browser/extensions/unpacked_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698