| Index: chrome/browser/mac/obsolete_system.cc
|
| diff --git a/chrome/browser/mac/obsolete_system.cc b/chrome/browser/mac/obsolete_system.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..844d75359c2be88acaabd9deee8b7f46795fbd77
|
| --- /dev/null
|
| +++ b/chrome/browser/mac/obsolete_system.cc
|
| @@ -0,0 +1,32 @@
|
| +// 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/obsolete_system.h"
|
| +
|
| +#include <sys/sysctl.h>
|
| +#include <sys/types.h>
|
| +
|
| +#include "grit/chromium_strings.h"
|
| +#include "ui/base/l10n/l10n_util.h"
|
| +
|
| +#if !defined(ARCH_CPU_64_BITS)
|
| +
|
| +// static
|
| +bool ObsoleteSystemMac::Has32BitOnlyCPU() {
|
| + int value;
|
| + size_t valueSize = sizeof(value);
|
| + if (sysctlbyname("hw.cpu64bit_capable", &value, &valueSize, NULL, 0) != 0) {
|
| + return true;
|
| + }
|
| + return value == 0;
|
| +}
|
| +
|
| +// static
|
| +base::string16 ObsoleteSystemMac::LocalizedObsoleteSystemString() {
|
| + return l10n_util::GetStringUTF16(
|
| + Is32BitEndOfTheLine() ? IDS_MAC_32_BIT_OBSOLETE_NOW :
|
| + IDS_MAC_32_BIT_OBSOLETE_SOON);
|
| +}
|
| +
|
| +#endif
|
|
|