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

Side by Side Diff: base/mac/launchd.h

Issue 9837098: Move launchd code from chrome/browser/mac to base/mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base.gypi ('k') | base/mac/launchd.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 #ifndef BASE_MAC_LAUNCHD_H_
6 #define BASE_MAC_LAUNCHD_H_
7 #pragma once
8
9 #include <launch.h>
10 #include <sys/types.h>
11
12 #include <string>
13
14 namespace base {
15 namespace mac {
16
17 // MessageForJob sends a single message to launchd with a simple dictionary
18 // mapping |operation| to |job_label|, and returns the result of calling
19 // launch_msg to send that message. On failure, returns NULL. The caller
20 // assumes ownership of the returned launch_data_t object.
21 launch_data_t MessageForJob(const std::string& job_label,
22 const char* operation);
23
24 // Returns the process ID for |job_label| if the job is running, 0 if the job
25 // is loaded but not running, or -1 on error.
26 pid_t PIDForJob(const std::string& job_label);
27
28 } // namespace mac
29 } // namespace base
30
31 #endif // BASE_MAC_LAUNCHD_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/mac/launchd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698