Home | History | Annotate | Download | only in mac
      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 #ifndef CHROME_BROWSER_MAC_OBSOLETE_SYSTEM_H_
      6 #define CHROME_BROWSER_MAC_OBSOLETE_SYSTEM_H_
      7 
      8 #include "base/basictypes.h"
      9 #include "base/strings/string16.h"
     10 
     11 class ObsoleteSystemMac {
     12  public:
     13   // true if 32-bit-only systems are already considered obsolete, or if
     14   // they'll be considered obsolete soon. Used to control whether to show
     15   // messaging about 32-bit deprecation within the app.
     16   static bool Is32BitObsoleteNowOrSoon() {
     17 #if defined(GOOGLE_CHROME_BUILD)
     18     return true;
     19 #else
     20     return false;
     21 #endif
     22   }
     23 
     24   // true if the system's CPU is 32-bit-only, false if it's 64-bit-capable.
     25 #if !defined(ARCH_CPU_64_BITS)
     26   static bool Has32BitOnlyCPU();
     27 #else
     28   static bool Has32BitOnlyCPU() {
     29     return false;
     30   }
     31 #endif
     32 
     33   // Returns a localized string informing users that their system will either
     34   // soon be unsupported by future versions of the application, or that they
     35   // are already using the last version of the application that supports their
     36   // system. Do not use the returned string unless both
     37   // Is32BitObsoleteNowOrSoon() and Has32BitOnlyCPU() return true.
     38 #if !defined(ARCH_CPU_64_BITS)
     39   static base::string16 LocalizedObsoleteSystemString();
     40 #else
     41   static base::string16 LocalizedObsoleteSystemString() {
     42     return base::string16();
     43   }
     44 #endif
     45 
     46   // true if this is the final release that will run on 32-bit-only systems.
     47   static bool Is32BitEndOfTheLine() {
     48     // TODO(mark): Change to true immediately prior to the final build that
     49     // supports 32-bit-only systems.
     50     return false;
     51   }
     52 
     53  private:
     54   DISALLOW_IMPLICIT_CONSTRUCTORS(ObsoleteSystemMac);
     55 };
     56 
     57 #endif  // CHROME_BROWSER_MAC_OBSOLETE_SYSTEM_H_
     58