electron/brightray/common/application_name_mac.mm
Adam Roben e1b5e5e1bf Store the disk cache in an app-specific location
We deduce the name of the application from the CFBundleName of the .app bundle
and use a path based on that. Similar logic should be implementable for other
platforms.

Fixes #3.
2013-03-13 16:45:00 -04:00

12 lines
294 B
Text

#import "common/application_name.h"
#import "base/mac/bundle_locations.h"
#import "base/mac/foundation_util.h"
namespace brightray {
std::string GetApplicationName() {
return [[base::mac::OuterBundle().infoDictionary objectForKey:base::mac::CFToNSCast(kCFBundleNameKey)] UTF8String];
}
}