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

Side by Side Diff: chrome/browser/extensions/blacklist_check.h

Issue 2693373003: PreloadCheck class for extension pre-install checks (Closed)
Patch Set: review ready 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_BLACKLIST_CHECK_H_
6 #define CHROME_BROWSER_EXTENSIONS_BLACKLIST_CHECK_H_
7
8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "extensions/browser/blacklist_state.h"
11 #include "extensions/browser/preload_check.h"
12
13 namespace extensions {
14
15 class Blacklist;
16 class Extension;
17
18 // Asynchronously checks whether the extension is blacklisted.
19 class BlacklistCheck : public PreloadCheck {
20 public:
21 BlacklistCheck(Blacklist* blacklist, const Extension* extension);
22 ~BlacklistCheck() override;
23
24 // PreloadCheck:
25 void Start(ResultCallback callback) override;
26
27 private:
28 void OnGetIsBlacklisted(BlacklistState blacklist_state);
29
30 Blacklist* blacklist_;
31 ResultCallback callback_;
32 base::WeakPtrFactory<BlacklistCheck> weak_ptr_factory_;
33
34 DISALLOW_COPY_AND_ASSIGN(BlacklistCheck);
35 };
36
37 } // namespace extensions
38
39 #endif // CHROME_BROWSER_EXTENSIONS_BLACKLIST_CHECK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698