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

Unified Diff: chrome/nacl/nacl_main_platform_delegate_mac.mm

Issue 8414020: Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/nacl/nacl_main_platform_delegate_mac.mm
===================================================================
--- chrome/nacl/nacl_main_platform_delegate_mac.mm (revision 107845)
+++ chrome/nacl/nacl_main_platform_delegate_mac.mm (working copy)
@@ -11,6 +11,7 @@
#include "base/native_library.h"
#include "chrome/common/chrome_switches.h"
#include "content/common/sandbox_mac.h"
+#include "content/public/common/sandbox_init.h"
NaClMainPlatformDelegate::NaClMainPlatformDelegate(
const MainFunctionParams& parameters)
@@ -32,7 +33,7 @@
}
void NaClMainPlatformDelegate::InitSandboxTests(bool no_sandbox) {
- const CommandLine& command_line = parameters_.command_line_;
+ const CommandLine& command_line = parameters_.command_line;
DVLOG(1) << "Started NaClLdr with ";
const std::vector<std::string>& argstrings = command_line.argv();
@@ -54,13 +55,8 @@
}
void NaClMainPlatformDelegate::EnableSandbox() {
- CommandLine* parsed_command_line = CommandLine::ForCurrentProcess();
- SandboxInitWrapper sandbox_wrapper;
- bool sandbox_initialized_ok =
- sandbox_wrapper.InitializeSandbox(*parsed_command_line,
- switches::kNaClLoaderProcess);
- CHECK(sandbox_initialized_ok) << "Error initializing sandbox for "
- << switches::kNaClLoaderProcess;
+ CHECK(content::InitializeSandbox()) << "Error initializing sandbox for "
+ << switches::kNaClLoaderProcess;
}
bool NaClMainPlatformDelegate::RunSandboxTests() {

Powered by Google App Engine
This is Rietveld 408576698