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

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

Issue 11747025: Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: restore missing registrations Created 7 years, 12 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
Index: chrome/browser/extensions/extension_function_registry.h
diff --git a/chrome/browser/extensions/extension_function_registry.h b/chrome/browser/extensions/extension_function_registry.h
index 3f6394288effa24541d0e29e3b16a187872861b0..cf74cb2366a16fbf4ac5c11e4bae15381eeca5ea 100644
--- a/chrome/browser/extensions/extension_function_registry.h
+++ b/chrome/browser/extensions/extension_function_registry.h
@@ -9,6 +9,8 @@
#include <string>
#include <vector>
+#include "base/logging.h"
+
class ExtensionFunction;
// A factory function for creating new ExtensionFunction instances.
@@ -44,6 +46,8 @@ class ExtensionFunctionRegistry {
template<class T>
void RegisterFunction() {
+ if (factories_.find(T::function_name()) != factories_.end())
+ NOTREACHED() << "Function already registered for " << T::function_name();
Yoyo Zhou 2013/01/04 23:54:33 This isn't going to work in multiprofile. We're m
not at google - send to devlin 2013/01/05 00:15:36 Done.
factories_[T::function_name()] = &NewExtensionFunction<T>;
}

Powered by Google App Engine
This is Rietveld 408576698