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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1415483008: Get rid of SandboxedProcessLauncherDelegate::PreSandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove curly braces Created 5 years, 1 month 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/chrome_content_browser_client.h ('k') | chrome/service/service_utility_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index f1ee07ecd399d85e35d77bd4b31cbf65cd6fd835..a1bf4a784eec0232bc7dfcf4ae7ab37836698bd2 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2558,9 +2558,8 @@ base::string16 ChromeContentBrowserClient::GetAppContainerSidForSandboxType(
return base::string16();
}
-void ChromeContentBrowserClient::PreSpawnRenderer(
- sandbox::TargetPolicy* policy,
- bool* success) {
+bool ChromeContentBrowserClient::PreSpawnRenderer(
+ sandbox::TargetPolicy* policy) {
// This code is duplicated in nacl_exe_win_64.cc.
// Allow the server side of a pipe restricted to the "chrome.nacl."
// namespace so that it cannot impersonate other system or other chrome
@@ -2569,20 +2568,15 @@ void ChromeContentBrowserClient::PreSpawnRenderer(
sandbox::TargetPolicy::SUBSYS_NAMED_PIPES,
sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY,
L"\\\\.\\pipe\\chrome.nacl.*");
- if (result != sandbox::SBOX_ALL_OK) {
- *success = false;
- return;
- }
+ if (result != sandbox::SBOX_ALL_OK)
+ return false;
// Renderers need to send named pipe handles and shared memory
// segment handles to NaCl loader processes.
result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES,
sandbox::TargetPolicy::HANDLES_DUP_ANY,
L"File");
- if (result != sandbox::SBOX_ALL_OK) {
- *success = false;
- return;
- }
+ return result == sandbox::SBOX_ALL_OK;
}
#endif
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/service/service_utility_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698