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

Side by Side Diff: extensions/browser/preload_check.h

Issue 2740853002: Use PreloadCheckGroup in ExtensionInstallChecker. Make RequirementsChecker a PreloadCheck. (Closed)
Patch Set: 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_BROWSER_PRELOAD_CHECK_H_ 5 #ifndef EXTENSIONS_BROWSER_PRELOAD_CHECK_H_
6 #define EXTENSIONS_BROWSER_PRELOAD_CHECK_H_ 6 #define EXTENSIONS_BROWSER_PRELOAD_CHECK_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_set> 9 #include <unordered_set>
10 #include <utility> 10 #include <utility>
(...skipping 10 matching lines...) Expand all
21 // precondition holds for loading the given extension. 21 // precondition holds for loading the given extension.
22 class PreloadCheck { 22 class PreloadCheck {
23 public: 23 public:
24 // These enumerators should only be referred to by name, so it is safe to 24 // These enumerators should only be referred to by name, so it is safe to
25 // insert or remove values as necessary. 25 // insert or remove values as necessary.
26 enum Error { 26 enum Error {
27 NONE, 27 NONE,
28 BLACKLISTED_ID, 28 BLACKLISTED_ID,
29 BLACKLISTED_UNKNOWN, 29 BLACKLISTED_UNKNOWN,
30 DISALLOWED_BY_POLICY, 30 DISALLOWED_BY_POLICY,
31 NPAPI_NOT_SUPPORTED,
32 WEBGL_NOT_SUPPORTED,
33 WINDOW_SHAPE_NOT_SUPPORTED,
31 }; 34 };
32 35
33 // TODO(michaelpg): Remove std::hash<int> template argument once std::hash 36 // TODO(michaelpg): Remove std::hash<int> template argument once std::hash
34 // directly supports enums. 37 // directly supports enums.
35 // See http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2148 38 // See http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2148
36 using Errors = std::unordered_set<Error, std::hash<int>>; 39 using Errors = std::unordered_set<Error, std::hash<int>>;
37 using ResultCallback = base::OnceCallback<void(Errors)>; 40 using ResultCallback = base::OnceCallback<void(Errors)>;
38 41
39 explicit PreloadCheck(scoped_refptr<const Extension> extension); 42 explicit PreloadCheck(scoped_refptr<const Extension> extension);
40 virtual ~PreloadCheck(); 43 virtual ~PreloadCheck();
(...skipping 10 matching lines...) Expand all
51 private: 54 private:
52 // The extension to check. 55 // The extension to check.
53 scoped_refptr<const Extension> extension_; 56 scoped_refptr<const Extension> extension_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(PreloadCheck); 58 DISALLOW_COPY_AND_ASSIGN(PreloadCheck);
56 }; 59 };
57 60
58 } // namespace extensions 61 } // namespace extensions
59 62
60 #endif // EXTENSIONS_BROWSER_PRELOAD_CHECK_H_ 63 #endif // EXTENSIONS_BROWSER_PRELOAD_CHECK_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/management/management_api_delegate.h ('k') | extensions/browser/preload_check_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698