Bug 913953 - Part c: Remove unused FSRef code; r=ehsan

This commit is contained in:
Ms2ger 2013-09-10 09:03:31 +02:00
parent e9be1996d4
commit 5d75570511
2 changed files with 0 additions and 20 deletions

View File

@ -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();

View File

@ -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};