| Index: chrome/browser/mac/system_bitness.cc
|
| diff --git a/chrome/browser/mac/system_bitness.cc b/chrome/browser/mac/system_bitness.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0f7582be9ddd304cf9bf4b08f5816c0e4a250efa
|
| --- /dev/null
|
| +++ b/chrome/browser/mac/system_bitness.cc
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/mac/system_bitness.h"
|
| +
|
| +#include <sys/sysctl.h>
|
| +#include <sys/types.h>
|
| +
|
| +#include "grit/chromium_strings.h"
|
| +#include "ui/base/l10n/l10n_util.h"
|
| +
|
| +namespace chrome {
|
| +
|
| +#if !defined(ARCH_CPU_64_BITS)
|
| +
|
| +bool Has32BitOnlyCPU() {
|
| + int value;
|
| + size_t valueSize = sizeof(value);
|
| + if (sysctlbyname("hw.cpu64bit_capable", &value, &valueSize, NULL, 0) != 0) {
|
| + return true;
|
| + }
|
| + return value == 0;
|
| +}
|
| +
|
| +base::string16 LocalizedObsoleteSystemString() {
|
| + return l10n_util::GetStringFUTF16(
|
| + Is32BitEndOfTheLine() ? IDS_MAC_32_BIT_OBSOLETE_NOW :
|
| + IDS_MAC_32_BIT_OBSOLETE_SOON,
|
| + l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
|
| +}
|
| +
|
| +#endif
|
| +
|
| +bool Is32BitEndOfTheLine() {
|
| + // TODO(mark): Change to true immediately prior to the final build that
|
| + // supports 32-bit-only systems.
|
| + return false;
|
| +}
|
| +
|
| +} // namespace chrome
|
|
|