Index: chrome/browser/extensions/blacklist_check.h |
diff --git a/chrome/browser/extensions/blacklist_check.h b/chrome/browser/extensions/blacklist_check.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..39b405a2afc6bfc1dc0518df1f4c40ae7cb03109 |
--- /dev/null |
+++ b/chrome/browser/extensions/blacklist_check.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_EXTENSIONS_BLACKLIST_CHECK_H_ |
+#define CHROME_BROWSER_EXTENSIONS_BLACKLIST_CHECK_H_ |
+ |
+#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
+#include "extensions/browser/blacklist_state.h" |
+#include "extensions/browser/preload_check.h" |
+ |
+namespace extensions { |
+ |
+class Blacklist; |
+class Extension; |
+ |
+// Asynchronously checks whether the extension is blacklisted. |
+class BlacklistCheck : public PreloadCheck { |
+ public: |
+ BlacklistCheck(Blacklist* blacklist, |
+ scoped_refptr<const Extension> extension); |
+ ~BlacklistCheck() override; |
+ |
+ // PreloadCheck: |
+ void Start(ResultCallback callback) override; |
+ |
+ private: |
+ void OnBlacklistedStateRetrieved(BlacklistState blacklist_state); |
+ |
+ Blacklist* blacklist_; |
+ ResultCallback callback_; |
+ base::WeakPtrFactory<BlacklistCheck> weak_ptr_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BlacklistCheck); |
+}; |
+ |
+} // namespace extensions |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_BLACKLIST_CHECK_H_ |