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

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

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/extensions/extension_error_reporter.h
diff --git a/chrome/browser/extensions/extension_error_reporter.h b/chrome/browser/extensions/extension_error_reporter.h
index ccc188754651c540defdefd89cac9986fda148f4..4d31389326ded1731bdf1a14d125386ab5dc3855 100644
--- a/chrome/browser/extensions/extension_error_reporter.h
+++ b/chrome/browser/extensions/extension_error_reporter.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/observer_list.h"
#include "base/strings/string16.h"
namespace base {
@@ -16,6 +17,7 @@ class FilePath;
}
class Profile;
+class ExtensionErrorReporterObserver;
// Exposes an easy way for the various components of the extension system to
// report errors. This is a singleton that lives on the UI thread, with the
@@ -54,6 +56,11 @@ class ExtensionErrorReporter {
// Clear the list of errors reported so far.
void ClearErrors();
+ void AddObserver(ExtensionErrorReporterObserver* observer);
+ void RemoveObserver(ExtensionErrorReporterObserver* observer);
+ void TriggerOnLoadFailure(const base::FilePath& extension_path,
+ const std::string& error);
+
private:
static ExtensionErrorReporter* instance_;
@@ -63,6 +70,8 @@ class ExtensionErrorReporter {
base::MessageLoop* ui_loop_;
std::vector<base::string16> errors_;
bool enable_noisy_errors_;
+
+ ObserverList<ExtensionErrorReporterObserver> observers_;
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_REPORTER_H_

Powered by Google App Engine
This is Rietveld 408576698