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