Index: ppapi/shared_impl/resource.h |
diff --git a/ppapi/shared_impl/resource.h b/ppapi/shared_impl/resource.h |
index 4c5dc358c1f48231955d778a99cb1b1c08bd55ae..bf852d24aaba28b860832fec9fb81977b89b6205 100644 |
--- a/ppapi/shared_impl/resource.h |
+++ b/ppapi/shared_impl/resource.h |
@@ -54,6 +54,7 @@ |
F(PPB_MessageLoop_API) \ |
F(PPB_NetworkList_API) \ |
F(PPB_NetworkMonitor_Private_API) \ |
+ F(PPB_NetworkProxy_API) \ |
F(PPB_PDF_API) \ |
F(PPB_Printing_API) \ |
F(PPB_ResourceArray_API) \ |
@@ -190,8 +191,11 @@ class PPAPI_SHARED_EXPORT Resource : public base::RefCounted<Resource> { |
FOR_ALL_PPAPI_RESOURCE_APIS(DEFINE_TYPE_GETTER) |
#undef DEFINE_TYPE_GETTER |
- // Template-based dynamic casting. See specializations below. |
- template <typename T> T* GetAs() { return NULL; } |
+ // Template-based dynamic casting. See specializations below. This is |
+ // unimplemented for the default case. This way, for anything that's not a |
+ // resource (or if a developer forgets to add the resource to the list in |
+ // this file), the result is a linker error. |
+ template <typename T> T* GetAs(); |
// Called when a PpapiPluginMsg_ResourceReply reply is received for a |
// previous CallRenderer. The message is the nested reply message, which may |