| OLD | NEW |
| 1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-2009 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 #include <Carbon/Carbon.h> | 8 #include <Carbon/Carbon.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Takes a path to an (executable) binary and tries to provide the path to an | 85 // Takes a path to an (executable) binary and tries to provide the path to an |
| 86 // application bundle containing it. It takes the outermost bundle that it can | 86 // application bundle containing it. It takes the outermost bundle that it can |
| 87 // find (so for "/Foo/Bar.app/.../Baz.app/..." it produces "/Foo/Bar.app"). | 87 // find (so for "/Foo/Bar.app/.../Baz.app/..." it produces "/Foo/Bar.app"). |
| 88 // |exec_name| - path to the binary | 88 // |exec_name| - path to the binary |
| 89 // returns - path to the application bundle, or empty on error | 89 // returns - path to the application bundle, or empty on error |
| 90 FilePath GetAppBundlePath(const FilePath& exec_name); | 90 FilePath GetAppBundlePath(const FilePath& exec_name); |
| 91 | 91 |
| 92 // Set the Time Machine exclusion property for the given file. | 92 // Set the Time Machine exclusion property for the given file. |
| 93 bool SetFileBackupExclusion(const FilePath& file_path, bool exclude); | 93 bool SetFileBackupExclusion(const FilePath& file_path, bool exclude); |
| 94 | 94 |
| 95 // Utility function to pull out a value from a dictionary, check its type, and |
| 96 // return it. Returns NULL if the key is not present or of the wrong type. |
| 97 CFTypeRef GetValueFromDictionary(CFDictionaryRef dict, |
| 98 CFStringRef key, |
| 99 CFTypeID expected_type); |
| 100 |
| 95 } // namespace mac_util | 101 } // namespace mac_util |
| 96 | 102 |
| 97 #endif // BASE_MAC_UTIL_H_ | 103 #endif // BASE_MAC_UTIL_H_ |
| OLD | NEW |