summaryrefslogtreecommitdiffstats
path: root/chrome/service
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-27 23:06:49 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-27 23:06:49 +0000
commit33b9820a5039e8a9925ddc0ebaced8f50112ce3b (patch)
treefc66820a0ea13d0160dfb3253028cb8a1d3b468f /chrome/service
parent1797640037e0127eb5f47bc60dc94b78a2b904b5 (diff)
downloadchromium_src-33b9820a5039e8a9925ddc0ebaced8f50112ce3b.zip
chromium_src-33b9820a5039e8a9925ddc0ebaced8f50112ce3b.tar.gz
chromium_src-33b9820a5039e8a9925ddc0ebaced8f50112ce3b.tar.bz2
Add OSSTATUS_LOG API.
Review URL: https://chromiumcodereview.appspot.com/9235084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119511 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service')
-rw-r--r--chrome/service/chrome_service_application_mac.mm18
1 files changed, 6 insertions, 12 deletions
diff --git a/chrome/service/chrome_service_application_mac.mm b/chrome/service/chrome_service_application_mac.mm
index 75f6b05..0b9bc7c 100644
--- a/chrome/service/chrome_service_application_mac.mm
+++ b/chrome/service/chrome_service_application_mac.mm
@@ -1,11 +1,11 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "chrome/service/chrome_service_application_mac.h"
-#include "base/logging.h"
#include "base/mac/foundation_util.h"
+#include "base/mac/mac_logging.h"
#import "chrome/common/cloud_print/cloud_print_class_mac.h"
#include "chrome/common/chrome_switches.h"
@@ -36,20 +36,17 @@
CFArrayRef passArgv =
CFArrayCreate(NULL, (const void**) flags, 1, &kCFTypeArrayCallBacks);
FSRef ref;
- OSStatus status = noErr;
CFURLRef* kDontWantURL = NULL;
// Get Chrome's bundle ID.
std::string bundleID = base::mac::BaseBundleID();
CFStringRef bundleIDCF =
CFStringCreateWithCString(NULL, bundleID.c_str(), kCFStringEncodingUTF8);
// Use Launch Services to locate Chrome using its bundleID.
- status = LSFindApplicationForInfo(kLSUnknownCreator, bundleIDCF,
- NULL, &ref, kDontWantURL);
+ OSStatus status = LSFindApplicationForInfo(kLSUnknownCreator, bundleIDCF,
+ NULL, &ref, kDontWantURL);
if (status != noErr) {
- LOG(ERROR) << "Failed to make path ref";
- LOG(ERROR) << GetMacOSStatusErrorString(status);
- LOG(ERROR) << GetMacOSStatusCommentString(status);
+ OSSTATUS_LOG(ERROR, status) << "Failed to make path ref";
return;
}
// Actually create the Apple Event.
@@ -78,9 +75,7 @@
// Send the Apple Event Using launch services, launching Chrome if necessary.
status = LSOpenApplication(&params, NULL);
if (status != noErr) {
- LOG(ERROR) << "Unable to launch";
- LOG(ERROR) << GetMacOSStatusErrorString(status);
- LOG(ERROR) << GetMacOSStatusCommentString(status);
+ OSSTATUS_LOG(ERROR, status) << "Unable to launch";
}
}
@@ -98,4 +93,3 @@ void RegisterServiceApp() {
}
} // namespace chrome_service_application_mac
-