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

Unified Diff: chrome/browser/extensions/blacklist_check.h

Issue 2693373003: PreloadCheck class for extension pre-install checks (Closed)
Patch Set: don't break enable_extensions=false Created 3 years, 9 months 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 | « chrome/browser/extensions/BUILD.gn ('k') | chrome/browser/extensions/blacklist_check.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « chrome/browser/extensions/BUILD.gn ('k') | chrome/browser/extensions/blacklist_check.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698