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

Side by Side Diff: base/mac/mac_util.h

Issue 7144007: Improve and unify Mac OS X run-time version checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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
« no previous file with comments | « no previous file | base/mac/mac_util.mm » ('j') | base/mac/mac_util.mm » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_MAC_MAC_UTIL_H_ 5 #ifndef BASE_MAC_MAC_UTIL_H_
6 #define BASE_MAC_MAC_UTIL_H_ 6 #define BASE_MAC_MAC_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <Carbon/Carbon.h> 9 #include <Carbon/Carbon.h>
10 #include <string> 10 #include <string>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // specified hide flag. 103 // specified hide flag.
104 void AddToLoginItems(bool hide_on_startup); 104 void AddToLoginItems(bool hide_on_startup);
105 105
106 // Removes the current application from the list Of Login Items. 106 // Removes the current application from the list Of Login Items.
107 void RemoveFromLoginItems(); 107 void RemoveFromLoginItems();
108 108
109 // Returns true if the current process was automatically launched as a 109 // Returns true if the current process was automatically launched as a
110 // 'Login Item' with 'hide on startup' flag. Used to suppress opening windows. 110 // 'Login Item' with 'hide on startup' flag. Used to suppress opening windows.
111 bool WasLaunchedAsHiddenLoginItem(); 111 bool WasLaunchedAsHiddenLoginItem();
112 112
113 // Run-time OS version checks. Use these instead of
114 // base::SysInfo::OperatingSystemVersionNumbers. Prefer the "OrEarlier" and
115 // "OrLater" variants to those that check for a specific version, unless you
116 // know for sure that you need to check for a specific version.
117
118 // Leopard is Mac OS X 10.5, Darwin 9.
119 bool IsOSLeopard();
120 bool IsOSLeopardOrEarlier();
121
122 // Snow Leopard is Mac OS X 10.6, Darwin 10.
123 bool IsOSSnowLeopard();
124 bool IsOSSnowLeopardOrEarlier();
125 bool IsOSSnowLeopardOrLater();
126
127 // Lion is Mac OS X 10.7, Darwin 11.
128 bool IsOSLion();
129 bool IsOSLionOrLater();
130
131 // This should be infrequently used. It only makes sense to avoid codepaths
132 // that are very likely to break on future (unreleased, untested, unborn) OS
133 // releases.
134 bool IsOSLaterThanLion();
135
113 } // namespace mac 136 } // namespace mac
114 } // namespace base 137 } // namespace base
115 138
116 #endif // BASE_MAC_MAC_UTIL_H_ 139 #endif // BASE_MAC_MAC_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/mac/mac_util.mm » ('j') | base/mac/mac_util.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698