Impelent signature generation for supervised user passwords.
[chromium-blink-merge.git] / components / nacl / renderer / sandbox_arch.cc
blob944bbc26e078ba543d8c737d384de7b20df9213c
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/logging.h"
6 #if defined(OS_WIN)
7 #include "base/win/windows_version.h"
8 #endif
10 namespace nacl {
12 const char* GetSandboxArch() {
13 #if defined(ARCH_CPU_ARM_FAMILY)
14 return "arm";
15 #elif defined(ARCH_CPU_MIPS_FAMILY)
16 return "mips32";
17 #elif defined(ARCH_CPU_X86_FAMILY)
19 #if defined(OS_WIN)
20 // We have to check the host architecture on Windows.
21 // See sandbox_isa.h for an explanation why.
22 if (base::win::OSInfo::GetInstance()->architecture() ==
23 base::win::OSInfo::X64_ARCHITECTURE)
24 return "x86-64";
25 else
26 return "x86-32";
27 #elif ARCH_CPU_64_BITS
28 return "x86-64";
29 #else
30 return "x86-32";
31 #endif // defined(OS_WIN)
33 #else
34 #error Architecture not supported.
35 #endif
38 } // namespace nacl