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

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

Issue 831813004: Get nacl building again for android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment out CheckEnvVar Created 5 years, 11 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
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..eb057e6a49ed5aa70cbdcee755f4b9df0c5b2cc7 100644
--- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc
+++ b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc
@@ -140,16 +140,21 @@ ppapi::host::HostFactory* NaClBrowserDelegateImpl::CreatePpapiHostFactory(
return new chrome::ChromeBrowserPepperHostFactory(ppapi_host);
}
-void NaClBrowserDelegateImpl::SetDebugPatterns(std::string debug_patterns) {
- if (!debug_patterns.empty() && debug_patterns[0] == '!') {
- inverse_debug_patterns_ = true;
- debug_patterns.erase(0, 1);
- }
+void NaClBrowserDelegateImpl::SetDebugPatterns(
+ const std::string& debug_patterns) {
+#if defined(ENABLE_EXTENSIONS)
if (debug_patterns.empty()) {
return;
}
std::vector<std::string> patterns;
- base::SplitString(debug_patterns, ',', &patterns);
+ if (debug_patterns[0] == '!') {
+ std::string negated_patterns = debug_patterns;
+ inverse_debug_patterns_ = true;
+ negated_patterns.erase(0, 1);
+ base::SplitString(negated_patterns, ',', &patterns);
+ } else {
+ base::SplitString(debug_patterns, ',', &patterns);
+ }
for (std::vector<std::string>::iterator iter = patterns.begin();
iter != patterns.end(); ++iter) {
// Allow chrome:// schema, which is used to filter out the internal
@@ -166,10 +171,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 +194,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

Powered by Google App Engine
This is Rietveld 408576698