OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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_UTIL_H_ | 5 #ifndef BASE_MAC_UTIL_H_ |
6 #define BASE_MAC_UTIL_H_ | 6 #define BASE_MAC_UTIL_H_ |
7 | 7 |
8 struct FSRef; | 8 struct FSRef; |
9 class FilePath; | 9 class FilePath; |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 bool FSRefFromPath(const std::string& path, FSRef* ref); | 22 bool FSRefFromPath(const std::string& path, FSRef* ref); |
23 | 23 |
24 // Returns true if the application is running from a bundle | 24 // Returns true if the application is running from a bundle |
25 bool AmIBundled(); | 25 bool AmIBundled(); |
26 | 26 |
27 // Returns the main bundle or the override, used for code that needs | 27 // Returns the main bundle or the override, used for code that needs |
28 // to fetch resources from bundles, but work within a unittest where we | 28 // to fetch resources from bundles, but work within a unittest where we |
29 // aren't a bundle. | 29 // aren't a bundle. |
30 NSBundle* MainAppBundle(); | 30 NSBundle* MainAppBundle(); |
31 | 31 |
| 32 // Returns the ~/Library directory. |
| 33 FilePath GetUserLibraryPath(); |
| 34 |
32 // Set the bundle that MainAppBundle will return, overriding the default value | 35 // Set the bundle that MainAppBundle will return, overriding the default value |
33 // (Restore the default by calling SetOverrideAppBundle(nil)). | 36 // (Restore the default by calling SetOverrideAppBundle(nil)). |
34 void SetOverrideAppBundle(NSBundle* bundle); | 37 void SetOverrideAppBundle(NSBundle* bundle); |
35 void SetOverrideAppBundlePath(const FilePath& file_path); | 38 void SetOverrideAppBundlePath(const FilePath& file_path); |
36 | 39 |
37 } // namespace mac_util | 40 } // namespace mac_util |
38 | 41 |
39 #endif // BASE_MAC_UTIL_H_ | 42 #endif // BASE_MAC_UTIL_H_ |
OLD | NEW |