summaryrefslogtreecommitdiffstats
path: root/xpcom/base/nsMacUtilsImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'xpcom/base/nsMacUtilsImpl.h')
-rw-r--r--xpcom/base/nsMacUtilsImpl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/xpcom/base/nsMacUtilsImpl.h b/xpcom/base/nsMacUtilsImpl.h
index cbdd5c1..68e6fc7 100644
--- a/xpcom/base/nsMacUtilsImpl.h
+++ b/xpcom/base/nsMacUtilsImpl.h
@@ -9,8 +9,11 @@
#include "nsIMacUtils.h"
#include "nsString.h"
+#include "mozilla/Atomics.h"
#include "mozilla/Attributes.h"
+using mozilla::Atomic;
+
class nsMacUtilsImpl final : public nsIMacUtils {
public:
NS_DECL_ISUPPORTS
@@ -18,6 +21,8 @@ class nsMacUtilsImpl final : public nsIMacUtils {
nsMacUtilsImpl() {}
+ static void EnableTCSMIfAvailable();
+
private:
~nsMacUtilsImpl() {}
@@ -26,6 +31,15 @@ class nsMacUtilsImpl final : public nsIMacUtils {
// A string containing a "-" delimited list of architectures
// in our binary.
nsString mBinaryArchs;
+
+ enum TCSMStatus { TCSM_Unknown = 0, TCSM_Available, TCSM_Unavailable };
+ static mozilla::Atomic<nsMacUtilsImpl::TCSMStatus> sTCSMStatus;
+
+ static bool IsTCSMAvailable();
+ static nsresult EnableTCSM();
+#if defined(DEBUG)
+ static bool IsTCSMEnabled();
+#endif
};
// Global singleton service