Chromium Code Reviews| 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>; |
| } |