mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
Bug 913953 - Part c: Remove unused FSRef code; r=ehsan
This commit is contained in:
parent
e9be1996d4
commit
5d75570511
@ -5,15 +5,8 @@
|
||||
#ifndef BASE_MAC_UTIL_H_
|
||||
#define BASE_MAC_UTIL_H_
|
||||
|
||||
struct FSRef;
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace mac_util {
|
||||
|
||||
std::string PathFromFSRef(const FSRef& ref);
|
||||
bool FSRefFromPath(const std::string& path, FSRef* ref);
|
||||
|
||||
// Returns true if the application is running from a bundle
|
||||
bool AmIBundled();
|
||||
|
||||
|
@ -14,19 +14,6 @@
|
||||
|
||||
namespace mac_util {
|
||||
|
||||
std::string PathFromFSRef(const FSRef& ref) {
|
||||
scoped_cftyperef<CFURLRef> url(
|
||||
CFURLCreateFromFSRef(kCFAllocatorDefault, &ref));
|
||||
NSString *path_string = [(NSURL *)url.get() path];
|
||||
return [path_string fileSystemRepresentation];
|
||||
}
|
||||
|
||||
bool FSRefFromPath(const std::string& path, FSRef* ref) {
|
||||
OSStatus status = FSPathMakeRef((const UInt8*)path.c_str(),
|
||||
ref, nil);
|
||||
return status == noErr;
|
||||
}
|
||||
|
||||
// Adapted from http://developer.apple.com/carbon/tipsandtricks.html#AmIBundled
|
||||
bool AmIBundled() {
|
||||
ProcessSerialNumber psn = {0, kCurrentProcess};
|
||||
|
Loading…
x
Reference in New Issue
Block a user