Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: chrome/browser/mac/system_bitness.cc

Issue 125443002: In-app messaging to communicate the imminent 32-bit deprecation to 32-bit-only users (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/mac/system_bitness.h"
6
7 #include <sys/sysctl.h>
8 #include <sys/types.h>
9
10 #include "grit/chromium_strings.h"
11 #include "ui/base/l10n/l10n_util.h"
12
13 namespace chrome {
14
15 #if !defined(ARCH_CPU_64_BITS)
16
17 bool Has32BitOnlyCPU() {
18 int value;
19 size_t valueSize = sizeof(value);
20 if (sysctlbyname("hw.cpu64bit_capable", &value, &valueSize, NULL, 0) != 0) {
21 return true;
22 }
23 return value == 0;
24 }
25
26 base::string16 LocalizedObsoleteSystemString() {
27 return l10n_util::GetStringFUTF16(
28 Is32BitEndOfTheLine() ? IDS_MAC_32_BIT_OBSOLETE_NOW :
29 IDS_MAC_32_BIT_OBSOLETE_SOON,
30 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
31 }
32
33 #endif
34
35 bool Is32BitEndOfTheLine() {
36 // TODO(mark): Change to true immediately prior to the final build that
37 // supports 32-bit-only systems.
38 return false;
39 }
40
41 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698