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

Unified Diff: extensions/browser/warning_service.h

Issue 698623002: Split WarningService from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: virtual -> override Created 6 years, 1 month 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 | « extensions/browser/mock_extension_system.cc ('k') | extensions/browser/warning_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « extensions/browser/mock_extension_system.cc ('k') | extensions/browser/warning_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698