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

Unified Diff: chrome/browser/mac/launchd.h

Issue 7273052: Install from disk image: Create persistent Dock icon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
Index: chrome/browser/mac/launchd.h
===================================================================
--- chrome/browser/mac/launchd.h (revision 0)
+++ chrome/browser/mac/launchd.h (revision 0)
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 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.
+
+#ifndef CHROME_BROWSER_MAC_LAUNCHD_H_
+#define CHROME_BROWSER_MAC_LAUNCHD_H_
+#pragma once
+
+#include <string>
+
+namespace launchd {
+
+// Equivalent to running "launchctl start |job_label|" from the command line.
+// Returns the errno obtained from making the request of launchd, 0 on
+// success, and -1 when no response could be made of launchd.
+int StartJob(const std::string& job_label);
Robert Sesek 2011/06/29 18:26:42 You don't use these. Is there a point to landing t
Mark Mentovai 2011/06/29 19:29:29 rsesek wrote:
+
+// As with StartJob, but for stopping jobs. Equivalent to "launchctl stop
+// |job_label|." Note that launchd may restart a stopped job immediately or
+// at some point in the future even without an explicit call to StartJob.
+int StopJob(const std::string& job_label);
+
+// Runs StopJob, and if successful, then StartJob.
+void RestartJob(const std::string& job_label);
+
+// Returns the PID for job_label, or -1 on error.
+int PIDForJob(const std::string& job_label);
+
+// Sends a signal to the job at job_label.
+void SignalJob(const std::string& job_label, int signal);
+
+} // namespace launchd
+
+#endif // CHROME_BROWSER_MAC_LAUNCHD_H_
Property changes on: chrome/browser/mac/launchd.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698