Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2494)

Unified Diff: base/mac_util.mm

Issue 3197012: [Mac] Add diagnostic logging to AmIBundled() to help with bot failures.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac_util.mm
===================================================================
--- base/mac_util.mm (revision 57050)
+++ base/mac_util.mm (working copy)
@@ -71,16 +71,29 @@
ProcessSerialNumber psn = {0, kCurrentProcess};
FSRef fsref;
- if (GetProcessBundleLocation(&psn, &fsref) != noErr)
+ if (GetProcessBundleLocation(&psn, &fsref) != noErr) {
+ LOG(ERROR) << "GetProcessBundleLocation failed, returning false";
return false;
+ }
FSCatalogInfo info;
+ HFSUniStr255 hfsname;
if (FSGetCatalogInfo(&fsref, kFSCatInfoNodeFlags, &info,
- NULL, NULL, NULL) != noErr) {
+ &hfsname, NULL, NULL) != noErr) {
+ LOG(ERROR) << "FSGetCatalogInfo failed, returning false";
return false;
}
- return info.nodeFlags & kFSNodeIsDirectoryMask;
+ scoped_cftyperef<CFStringRef> cfname(
+ CFStringCreateWithCharacters(kCFAllocatorDefault,
+ hfsname.unicode,
+ hfsname.length));
+ std::string filename = base::SysCFStringRefToUTF8(cfname);
+ bool bundled = info.nodeFlags & kFSNodeIsDirectoryMask;
+ LOG(ERROR) << "AmIBundled() filename is: " << filename
+ << ", returning " << (bundled ? "true" : "false");
+
+ return bundled;
}
bool IsBackgroundOnlyProcess() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698