Index: chrome/browser/nacl_host/nacl_browser_delegate_impl.cc |
diff --git a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc |
index 9e7b83f7f7c2dd83f12fd358b8c8a048836df68a..b14b686c9d4e539202caee3a6b52083cde4165ca 100644 |
--- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc |
+++ b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc |
@@ -164,11 +164,16 @@ void NaClBrowserDelegateImpl::SetDebugPatterns(std::string debug_patterns) { |
for (std::vector<std::string>::iterator iter = patterns.begin(); |
iter != patterns.end(); ++iter) { |
URLPattern pattern; |
+ // Allow chrome:// schema, which is used to filter out the internal |
+ // PNaCl translator. Also allow chrome-extension:// schema (which |
+ // can have NaCl modules). The default is to disallow these schema |
+ // since they can be dangerous in the context of chrome extension |
+ // permissions, but they are okay here, for NaCl GDB avoidance. |
+ pattern.SetValidSchemes(URLPattern::SCHEME_ALL); |
teravest
2014/02/25 18:51:29
I'm confused. Why do you want to set the scheme he
jvoung (off chromium)
2014/02/25 23:52:31
Yes, the problem is that Parse() would otherwise f
|
if (pattern.Parse(*iter) == URLPattern::PARSE_SUCCESS) { |
// If URL pattern has scheme equal to *, Parse method resets valid |
// schemes mask to http and https only, so we need to reset it after |
- // Parse to include chrome-extension scheme that can be used by NaCl |
- // manifest files. |
+ // Parse to re-include chrome-extension and chrome schema. |
pattern.SetValidSchemes(URLPattern::SCHEME_ALL); |
debug_patterns_.push_back(pattern); |
} |