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

Unified Diff: chrome/browser/mac/system_bitness.h

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/mac/system_bitness.h
diff --git a/chrome/browser/mac/system_bitness.h b/chrome/browser/mac/system_bitness.h
new file mode 100644
index 0000000000000000000000000000000000000000..f15a76ded68336ba3c1bc37a3f0ccbed142c03bc
--- /dev/null
+++ b/chrome/browser/mac/system_bitness.h
@@ -0,0 +1,53 @@
+// 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.
+
+#ifndef CHROME_BROWSER_MAC_SYSTEM_BITNESS_H_
+#define CHROME_BROWSER_MAC_SYSTEM_BITNESS_H_
+
+#include "base/strings/string16.h"
+#include "build/build_config.h"
+
+namespace chrome {
Nico 2014/01/07 00:51:37 I thought stuff in chrome/ isn't in a namespace (?
+
+// true if 32-bit-only systems are already considered obsolete, or if they'll
+// be considered obsolete soon. Used to control whether to show messaging
+// about 32-bit deprecation within the app.
+inline bool Is32BitObsoleteNowOrSoon() {
+#if defined(GOOGLE_CHROME_BUILD)
+ return true;
+#else
+ return false;
+#endif
+}
+
+#if !defined(ARCH_CPU_64_BITS)
+
+// true if the system's CPU is 32-bit-only, false if it's 64-bit-capable.
+bool Has32BitOnlyCPU();
+
+// Returns a localized string informing users that their system will either
+// soon be unsupported by future versions of the application, or that they are
+// already using the last version of the application that supports their
+// system. Do not use the returned string unless Has32BitOnlyCPU() returns
+// true.
+base::string16 LocalizedObsoleteSystemString();
+
+#else
+
+inline bool Has32BitOnlyCPU() {
+ return false;
+}
+
+inline base::string16 LocalizedObsoleteSystemString() {
+ return base::string16();
+}
+
+#endif
+
+// true if this is the final release that will run on 32-bit-only systems.
+bool Is32BitEndOfTheLine();
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_MAC_SYSTEM_BITNESS_H_

Powered by Google App Engine
This is Rietveld 408576698