| Index: extensions/browser/warning_service.h
|
| diff --git a/extensions/browser/warning_service.h b/extensions/browser/warning_service.h
|
| index 283bf6d069dec3ceba3cb2021f9fc286c709d82e..5aa9a50a885898da5650caa9bafb849e9f42ba5d 100644
|
| --- a/extensions/browser/warning_service.h
|
| +++ b/extensions/browser/warning_service.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/observer_list.h"
|
| #include "base/scoped_observer.h"
|
| #include "base/threading/non_thread_safe.h"
|
| +#include "components/keyed_service/core/keyed_service.h"
|
| #include "extensions/browser/extension_registry_observer.h"
|
| #include "extensions/browser/warning_set.h"
|
|
|
| @@ -31,7 +32,8 @@ class ExtensionRegistry;
|
| // conflicting modifications of network requests by extensions, slow extensions,
|
| // etc.) trigger a warning badge in the UI and and provide means to resolve
|
| // them. This class must be used on the UI thread only.
|
| -class WarningService : public ExtensionRegistryObserver,
|
| +class WarningService : public KeyedService,
|
| + public ExtensionRegistryObserver,
|
| public base::NonThreadSafe {
|
| public:
|
| class Observer {
|
| @@ -44,6 +46,10 @@ class WarningService : public ExtensionRegistryObserver,
|
| explicit WarningService(content::BrowserContext* browser_context);
|
| ~WarningService() override;
|
|
|
| + // Get the instance of the WarningService for |browser_context|.
|
| + // Redirected in incognito.
|
| + static WarningService* Get(content::BrowserContext* browser_context);
|
| +
|
| // Clears all warnings of types contained in |types| and notifies observers
|
| // of the changed warnings.
|
| void ClearWarnings(const std::set<Warning::WarningType>& types);
|
|
|