Index: components/nacl/nacl/nacl_main_platform_delegate_mac.mm |
diff --git a/chrome/nacl/nacl_main_platform_delegate_mac.mm b/components/nacl/nacl/nacl_main_platform_delegate_mac.mm |
similarity index 84% |
rename from chrome/nacl/nacl_main_platform_delegate_mac.mm |
rename to components/nacl/nacl/nacl_main_platform_delegate_mac.mm |
index e304ea7b9cfac6edefa103cad4bd2619f74ce66c..d08d884a5dde258677d469e82fead63fda387f29 100644 |
--- a/chrome/nacl/nacl_main_platform_delegate_mac.mm |
+++ b/components/nacl/nacl/nacl_main_platform_delegate_mac.mm |
@@ -2,15 +2,15 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/nacl/nacl_main_platform_delegate.h" |
+#include "components/nacl/nacl/nacl_main_platform_delegate.h" |
#import <Cocoa/Cocoa.h> |
#include "base/command_line.h" |
#include "base/files/file_path.h" |
#include "base/logging.h" |
#include "base/native_library.h" |
-#include "chrome/common/chrome_sandbox_type_mac.h" |
-#include "chrome/common/chrome_switches.h" |
+#include "components/nacl/common/nacl_delegate.h" |
+#include "components/nacl/common/nacl_sandbox_type_mac.h" |
#include "content/public/common/sandbox_init.h" |
NaClMainPlatformDelegate::NaClMainPlatformDelegate( |
@@ -45,8 +45,8 @@ void NaClMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { |
// Comment-out guard and recompile if you REALLY want to test w/out the SB. |
// TODO(jvoung): allow testing without sandbox, but change expected ret vals. |
if (!no_sandbox) { |
- base::FilePath test_dll_name = |
- command_line.GetSwitchValuePath(switches::kTestNaClSandbox); |
+ base::FilePath test_dll_name = command_line.GetSwitchValuePath( |
+ GetNaClDelegate()->GetSwitch(NaClDelegate::kTestNaClSandbox)); |
if (!test_dll_name.empty()) { |
sandbox_test_module_ = base::LoadNativeLibrary(test_dll_name, NULL); |
CHECK(sandbox_test_module_); |
@@ -55,9 +55,10 @@ void NaClMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { |
} |
void NaClMainPlatformDelegate::EnableSandbox() { |
- CHECK(content::InitializeSandbox(CHROME_SANDBOX_TYPE_NACL_LOADER, |
+ CHECK(content::InitializeSandbox(NACL_SANDBOX_TYPE_NACL_LOADER, |
base::FilePath())) |
- << "Error initializing sandbox for " << switches::kNaClLoaderProcess; |
+ << "Error initializing sandbox for " |
+ << GetNaClDelegate()->GetSwitch(NaClDelegate::kNaClLoaderProcess); |
} |
bool NaClMainPlatformDelegate::RunSandboxTests() { |