Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / blacklist.h
index 2636825..c4e438a 100644 (file)
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "chrome/browser/safe_browsing/database_manager.h"
+#include "components/keyed_service/core/keyed_service.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
 #include "extensions/browser/blacklist_state.h"
 
+namespace content {
+class BrowserContext;
+}
+
 namespace extensions {
 
 class BlacklistStateFetcher;
@@ -27,7 +32,8 @@ class Extension;
 class ExtensionPrefs;
 
 // The blacklist of extensions backed by safe browsing.
-class Blacklist : public content::NotificationObserver,
+class Blacklist : public KeyedService,
+                  public content::NotificationObserver,
                   public base::SupportsWeakPtr<Blacklist> {
  public:
   class Observer {
@@ -69,7 +75,9 @@ class Blacklist : public content::NotificationObserver,
 
   explicit Blacklist(ExtensionPrefs* prefs);
 
-  virtual ~Blacklist();
+  ~Blacklist() override;
+
+  static Blacklist* Get(content::BrowserContext* context);
 
   // From the set of extension IDs passed in via |ids|, asynchronously checks
   // which are blacklisted and includes them in the resulting map passed
@@ -112,9 +120,9 @@ class Blacklist : public content::NotificationObserver,
   static scoped_refptr<SafeBrowsingDatabaseManager> GetDatabaseManager();
 
   // content::NotificationObserver
-  virtual void Observe(int type,
-                       const content::NotificationSource& source,
-                       const content::NotificationDetails& details) OVERRIDE;
+  void Observe(int type,
+               const content::NotificationSource& source,
+               const content::NotificationDetails& details) override;
 
   void GetBlacklistStateForIDs(const GetBlacklistedIDsCallback& callback,
                                const std::set<std::string>& blacklisted_ids);