OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/service/service_process_control.h" | |
6 | |
7 #include "base/bind.h" | |
8 #include "base/command_line.h" | |
9 #include "base/mac/scoped_cftyperef.h" | |
10 #include "chrome/common/service_process_util_posix.h" | |
11 #include "content/public/browser/browser_thread.h" | |
12 #include "third_party/GTM/Foundation/GTMServiceManagement.h" | |
13 | |
14 using content::BrowserThread; | |
15 | |
16 void ServiceProcessControl::Launcher::DoRun() { | |
17 base::ScopedCFTypeRef<CFDictionaryRef> launchd_plist( | |
18 CreateServiceProcessLaunchdPlist(cmd_line_.get(), false)); | |
19 CFErrorRef error = NULL; | |
20 if (!GTMSMJobSubmit(launchd_plist, &error)) { | |
21 LOG(ERROR) << error; | |
22 CFRelease(error); | |
23 } else { | |
24 launched_ = true; | |
25 } | |
26 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | |
27 base::Bind(&Launcher::Notify, this)); | |
28 } | |
OLD | NEW |