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

Unified Diff: chrome/common/service_process_util_mac.mm

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 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 | « chrome/common/multi_process_lock_mac.cc ('k') | chrome/common/service_process_util_posix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/service_process_util_mac.mm
diff --git a/chrome/common/service_process_util_mac.mm b/chrome/common/service_process_util_mac.mm
index 4848b805cfb94e8ba4944e975d1111188b052307..03a61242cc05b36c43b1620ee07c216a38057b1a 100644
--- a/chrome/common/service_process_util_mac.mm
+++ b/chrome/common/service_process_util_mac.mm
@@ -67,7 +67,7 @@ bool GetParentFSRef(const FSRef& child, FSRef* parent) {
bool RemoveFromLaunchd() {
// We're killing a file.
base::ThreadRestrictions::AssertIOAllowed();
- base::mac::ScopedCFTypeRef<CFStringRef> name(CopyServiceProcessLaunchDName());
+ base::ScopedCFTypeRef<CFStringRef> name(CopyServiceProcessLaunchDName());
return Launchd::GetInstance()->DeletePlist(Launchd::User,
Launchd::Agent,
name);
@@ -295,8 +295,8 @@ bool ServiceProcessState::AddToAutoRun() {
// We're creating directories and writing a file.
base::ThreadRestrictions::AssertIOAllowed();
DCHECK(autorun_command_line_.get());
- base::mac::ScopedCFTypeRef<CFStringRef> name(CopyServiceProcessLaunchDName());
- base::mac::ScopedCFTypeRef<CFDictionaryRef> plist(
+ base::ScopedCFTypeRef<CFStringRef> name(CopyServiceProcessLaunchDName());
+ base::ScopedCFTypeRef<CFDictionaryRef> plist(
CreateServiceProcessLaunchdPlist(autorun_command_line_.get(), true));
return Launchd::GetInstance()->WritePlistToFile(Launchd::User,
Launchd::Agent,
@@ -358,10 +358,10 @@ void ExecFilePathWatcherCallback::NotifyPathChanged(const base::FilePath& path,
if (GetParentFSRef(macos_fsref, &contents_fsref)) {
FSRef bundle_fsref;
if (GetParentFSRef(contents_fsref, &bundle_fsref)) {
- base::mac::ScopedCFTypeRef<CFURLRef> bundle_url(
+ base::ScopedCFTypeRef<CFURLRef> bundle_url(
CFURLCreateFromFSRef(kCFAllocatorDefault, &bundle_fsref));
if (bundle_url.get()) {
- base::mac::ScopedCFTypeRef<CFBundleRef> bundle(
+ base::ScopedCFTypeRef<CFBundleRef> bundle(
CFBundleCreate(kCFAllocatorDefault, bundle_url));
// Check to see if the bundle still has a minimal structure.
good_bundle = CFBundleGetIdentifier(bundle) != NULL;
@@ -394,13 +394,11 @@ void ExecFilePathWatcherCallback::NotifyPathChanged(const base::FilePath& path,
}
if (needs_shutdown || needs_restart) {
// First deal with the plist.
- base::mac::ScopedCFTypeRef<CFStringRef> name(
- CopyServiceProcessLaunchDName());
+ base::ScopedCFTypeRef<CFStringRef> name(CopyServiceProcessLaunchDName());
if (needs_restart) {
- base::mac::ScopedCFTypeRef<CFMutableDictionaryRef> plist(
- Launchd::GetInstance()->CreatePlistFromFile(Launchd::User,
- Launchd::Agent,
- name));
+ base::ScopedCFTypeRef<CFMutableDictionaryRef> plist(
+ Launchd::GetInstance()->CreatePlistFromFile(
+ Launchd::User, Launchd::Agent, name));
if (plist.get()) {
NSMutableDictionary* ns_plist = base::mac::CFToNSCast(plist);
std::string new_path = base::mac::PathFromFSRef(executable_fsref_);
@@ -445,7 +443,7 @@ void ExecFilePathWatcherCallback::NotifyPathChanged(const base::FilePath& path,
base::mac::NSToCFCast(GetServiceProcessLaunchDLabel());
CFErrorRef err = NULL;
if (!Launchd::GetInstance()->RemoveJob(label, &err)) {
- base::mac::ScopedCFTypeRef<CFErrorRef> scoped_err(err);
+ base::ScopedCFTypeRef<CFErrorRef> scoped_err(err);
DLOG(ERROR) << "RemoveJob " << err;
// Exiting with zero, so launchd doesn't restart the process.
exit(0);
« no previous file with comments | « chrome/common/multi_process_lock_mac.cc ('k') | chrome/common/service_process_util_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698