Chromium Code Reviews| Index: components/nacl/renderer/arch_x86/sandbox_isa.cc |
| diff --git a/components/nacl/renderer/arch_x86/sandbox_isa.cc b/components/nacl/renderer/arch_x86/sandbox_isa.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ab650b13e513cb2b973201a4fefd2c28c3ea3285 |
| --- /dev/null |
| +++ b/components/nacl/renderer/arch_x86/sandbox_isa.cc |
| @@ -0,0 +1,25 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
dmichael (off chromium)
2014/03/10 22:49:35
nit: 2014
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// The list of supported ISA strings for x86. See issue: |
| +// http://code.google.com/p/nativeclient/issues/detail?id=1040 for more |
| +// information. Note that these string are to be case-insensitive compared. |
| +const char kNexeArchX86_64[] = "x86-64"; |
| +#if !(defined(OS_POSIX) || TARGET_ARCH_X64) |
| +const char kNexeArchX86_32[] = "x86-32"; |
| +#endif |
| + |
| +namespace nacl { |
|
dmichael (off chromium)
2014/03/10 22:49:35
nit: should be a carriage return after this
|
| +const char* GetSandboxISA() { |
| +#if (defined(OS_POSIX) || TARGET_ARCH_X64) |
| + return kNexeArchX86_64; |
| +#else |
| + // 32-bit Windows build, so we have to determine the OS architecture. |
| + if (OSInfo::GetInstance()->architecture() == X64_ARCHITECTURE) |
| + return kNexeArchX86_64; |
|
dmichael (off chromium)
2014/03/10 22:49:35
We talked about how on Windows 64, we want this to
|
| + else |
| + return kNexeArchX86_32; |
| +#endif |
| +} |
| +} // namespace nacl |
|
dmichael (off chromium)
2014/03/10 22:49:35
nit: should be a carriage return before this
|