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

Side by Side Diff: extensions/common/manifest_handler.h

Issue 408493002: Make Clone, Contains, Equal and IPC function non-virtual and implement in manifest_permission.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src@warnings
Patch Set: Remove DCHECK Created 6 years, 5 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 (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
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 class MockManifestHandlerRegistry;
126 friend struct base::DefaultLazyInstanceTraits<ManifestHandlerRegistry>; 127 friend struct base::DefaultLazyInstanceTraits<ManifestHandlerRegistry>;
127 128
128 ManifestHandlerRegistry(); 129 ManifestHandlerRegistry();
129 ~ManifestHandlerRegistry(); 130 ~ManifestHandlerRegistry();
130 131
131 void Finalize(); 132 void Finalize();
132 133
133 void RegisterManifestHandler(const std::string& key, 134 void RegisterManifestHandler(const std::string& key,
134 linked_ptr<ManifestHandler> handler); 135 linked_ptr<ManifestHandler> handler);
135 bool ParseExtension(Extension* extension, base::string16* error); 136 bool ParseExtension(Extension* extension, base::string16* error);
136 bool ValidateExtension(const Extension* extension, 137 bool ValidateExtension(const Extension* extension,
137 std::string* error, 138 std::string* error,
138 std::vector<InstallWarning>* warnings); 139 std::vector<InstallWarning>* warnings);
139 140
140 ManifestPermission* CreatePermission(const std::string& key); 141 virtual ManifestPermission* CreatePermission(const std::string& key);
not at google - send to devlin 2014/07/18 22:02:18 see comment in manifest_permission.cc. it's a sham
aboxhall 2014/07/18 22:38:16 Acknowledged.
141 142
142 void AddExtensionInitialRequiredPermissions( 143 void AddExtensionInitialRequiredPermissions(
143 const Extension* extension, 144 const Extension* extension,
144 ManifestPermissionSet* permission_set); 145 ManifestPermissionSet* permission_set);
145 146
146 // Overrides the current global ManifestHandlerRegistry with 147 // Overrides the current global ManifestHandlerRegistry with
147 // |registry|, returning the current one. 148 // |registry|, returning the current one.
148 static ManifestHandlerRegistry* SetForTesting( 149 static ManifestHandlerRegistry* SetForTesting(
149 ManifestHandlerRegistry* new_registry); 150 ManifestHandlerRegistry* new_registry);
150 151
(...skipping 13 matching lines...) Expand all
164 // The priority for each manifest handler. Handlers with lower priority 165 // The priority for each manifest handler. Handlers with lower priority
165 // values are evaluated first. 166 // values are evaluated first.
166 ManifestHandlerPriorityMap priority_map_; 167 ManifestHandlerPriorityMap priority_map_;
167 168
168 bool is_finalized_; 169 bool is_finalized_;
169 }; 170 };
170 171
171 } // namespace extensions 172 } // namespace extensions
172 173
173 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLER_H_ 174 #endif // EXTENSIONS_COMMON_MANIFEST_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698