Index: components/nacl/renderer/ppb_nacl_private_impl.cc |
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc |
index 46b2823564d446797ee57f1b98bf58472c0dcf08..644737e85e00300312c3564e48dac94d8cf51eac 100644 |
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc |
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc |
@@ -470,9 +470,18 @@ void InstanceDestroyed(PP_Instance instance) { |
map.erase(instance); |
} |
-PP_Bool NaClDebugStubEnabled() { |
- return PP_FromBool(CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kEnableNaClDebug)); |
+PP_Bool NaClDebugEnabledForURL(const char* alleged_nmf_url) { |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNaClDebug)) |
+ return PP_FALSE; |
+ bool should_debug; |
+ IPC::Sender* sender = content::RenderThread::Get(); |
+ DCHECK(sender); |
+ if(!sender->Send(new NaClHostMsg_NaClDebugEnabledForURL( |
+ GURL(alleged_nmf_url), |
+ &should_debug))) { |
+ return PP_FALSE; |
+ } |
+ return PP_FromBool(should_debug); |
} |
const char* GetSandboxArch() { |
@@ -518,7 +527,7 @@ const PPB_NaCl_Private nacl_interface = { |
&ReportLoadError, |
&InstanceCreated, |
&InstanceDestroyed, |
- &NaClDebugStubEnabled, |
+ &NaClDebugEnabledForURL, |
&GetSandboxArch, |
&GetUrlScheme, |
&LogToConsole |