OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_COMMON_MANIFEST_HANDLER_H_ | 5 #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLER_H_ |
6 #define EXTENSIONS_COMMON_MANIFEST_HANDLER_H_ | 6 #define EXTENSIONS_COMMON_MANIFEST_HANDLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 private: | 116 private: |
117 // The keys to register us for (in Register). | 117 // The keys to register us for (in Register). |
118 virtual const std::vector<std::string> Keys() const = 0; | 118 virtual const std::vector<std::string> Keys() const = 0; |
119 }; | 119 }; |
120 | 120 |
121 // The global registry for manifest handlers. | 121 // The global registry for manifest handlers. |
122 class ManifestHandlerRegistry { | 122 class ManifestHandlerRegistry { |
123 private: | 123 private: |
124 friend class ManifestHandler; | 124 friend class ManifestHandler; |
125 friend class ScopedTestingManifestHandlerRegistry; | 125 friend class ScopedTestingManifestHandlerRegistry; |
126 friend struct base::DefaultLazyInstanceTraits<ManifestHandlerRegistry>; | 126 friend struct base::LazyInstanceTraitsBase<ManifestHandlerRegistry>; |
127 | 127 |
128 ManifestHandlerRegistry(); | 128 ManifestHandlerRegistry(); |
129 ~ManifestHandlerRegistry(); | 129 ~ManifestHandlerRegistry(); |
130 | 130 |
131 void Finalize(); | 131 void Finalize(); |
132 | 132 |
133 void RegisterManifestHandler(const std::string& key, | 133 void RegisterManifestHandler(const std::string& key, |
134 linked_ptr<ManifestHandler> handler); | 134 linked_ptr<ManifestHandler> handler); |
135 bool ParseExtension(Extension* extension, base::string16* error); | 135 bool ParseExtension(Extension* extension, base::string16* error); |
136 bool ValidateExtension(const Extension* extension, | 136 bool ValidateExtension(const Extension* extension, |
(...skipping 27 matching lines...) Expand all Loading... |
164 // The priority for each manifest handler. Handlers with lower priority | 164 // The priority for each manifest handler. Handlers with lower priority |
165 // values are evaluated first. | 165 // values are evaluated first. |
166 ManifestHandlerPriorityMap priority_map_; | 166 ManifestHandlerPriorityMap priority_map_; |
167 | 167 |
168 bool is_finalized_; | 168 bool is_finalized_; |
169 }; | 169 }; |
170 | 170 |
171 } // namespace extensions | 171 } // namespace extensions |
172 | 172 |
173 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLER_H_ | 173 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLER_H_ |
OLD | NEW |