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

Unified Diff: chrome/browser/nacl_host/nacl_browser_delegate_impl.cc

Issue 176813010: Avoid blocking the PNaCl translator processes when chrome NaCl GDB flag is on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 9 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | components/nacl/browser/nacl_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b30a3ae0789a1dfb82969b250b67b19187abd5e8 100644
--- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc
+++ b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc
@@ -163,12 +163,16 @@ void NaClBrowserDelegateImpl::SetDebugPatterns(std::string debug_patterns) {
base::SplitString(debug_patterns, ',', &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.
+ URLPattern pattern(URLPattern::SCHEME_ALL);
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);
}
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | components/nacl/browser/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698