Chromium Code Reviews| 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 e1c5498b5bbbcbc416a8081b6f77f32388a7021b..a16ae48abf0e5a36ed5718a3610df1a68ccae167 100644 |
| --- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc |
| +++ b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc |
| @@ -141,6 +141,7 @@ ppapi::host::HostFactory* NaClBrowserDelegateImpl::CreatePpapiHostFactory( |
| } |
| void NaClBrowserDelegateImpl::SetDebugPatterns(std::string debug_patterns) { |
|
Lei Zhang
2015/01/21 21:32:22
BTW, would you mind making |debug_patterns| const
sehr
2015/01/22 19:57:22
Done.
|
| +#if defined(ENABLE_EXTENSIONS) |
| if (!debug_patterns.empty() && debug_patterns[0] == '!') { |
| inverse_debug_patterns_ = true; |
| debug_patterns.erase(0, 1); |
| @@ -166,10 +167,12 @@ void NaClBrowserDelegateImpl::SetDebugPatterns(std::string debug_patterns) { |
| debug_patterns_.push_back(pattern); |
| } |
| } |
| +#endif // defined(ENABLE_EXTENSIONS) |
| } |
| bool NaClBrowserDelegateImpl::URLMatchesDebugPatterns( |
| const GURL& manifest_url) { |
| +#if defined(ENABLE_EXTENSIONS) |
| // Empty patterns are forbidden so we ignore them. |
| if (debug_patterns_.empty()) { |
| return true; |
| @@ -187,6 +190,9 @@ bool NaClBrowserDelegateImpl::URLMatchesDebugPatterns( |
| } else { |
| return matches; |
| } |
| +#else |
| + return false; |
| +#endif // defined(ENABLE_EXTENSIONS) |
| } |
| // This function is security sensitive. Be sure to check with a security |