| Index: chrome/browser/extensions/extension_warning_set.h
|
| diff --git a/chrome/browser/extensions/extension_warning_set.h b/chrome/browser/extensions/extension_warning_set.h
|
| index d2032117bcb920f57114c9beb917daafd7124669..96d02b39bb9899e2c1c15225802c15b6e0212a04 100644
|
| --- a/chrome/browser/extensions/extension_warning_set.h
|
| +++ b/chrome/browser/extensions/extension_warning_set.h
|
| @@ -11,6 +11,7 @@
|
|
|
| #include "base/memory/linked_ptr.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/observer_list.h"
|
| #include "base/string16.h"
|
| #include "base/threading/non_thread_safe.h"
|
| #include "googleurl/src/gurl.h"
|
| @@ -135,6 +136,11 @@ class ExtensionWarningSet {
|
| // them. This class must be used on the UI thread only.
|
| class ExtensionWarningService : public base::NonThreadSafe {
|
| public:
|
| + class Observer {
|
| + public:
|
| + virtual void ExtensionWarningsChanged() = 0;
|
| + };
|
| +
|
| // |profile| may be NULL for testing. In this case, be sure to not insert
|
| // any warnings.
|
| explicit ExtensionWarningService(Profile* profile);
|
| @@ -174,6 +180,9 @@ class ExtensionWarningService : public base::NonThreadSafe {
|
| void* profile_id,
|
| scoped_ptr<ExtensionWarningSet> warnings);
|
|
|
| + void AddObserver(Observer* observer);
|
| + void RemoveObserver(Observer* observer);
|
| +
|
| protected:
|
| // Virtual for testing.
|
| virtual void NotifyWarningsChanged();
|
| @@ -194,6 +203,8 @@ class ExtensionWarningService : public base::NonThreadSafe {
|
| std::set<linked_ptr<ExtensionWarning> > badge_suppressions_;
|
|
|
| Profile* profile_;
|
| +
|
| + ObserverList<Observer> observer_list_;
|
| };
|
|
|
| } // namespace extensions
|
|
|