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

Unified Diff: chrome/service/service_process.h

Issue 7736002: Make the mac service process handling code clean itself up properly as far as launchd is concerned. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add launchd test Created 9 years, 4 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/service_process_util_win.cc ('k') | chrome/service/service_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_process.h
diff --git a/chrome/service/service_process.h b/chrome/service/service_process.h
index 8379fb8980c2e5618b83100198251d3760a471b4..55f265e97185a6232c62ce570d368884b17274e1 100644
--- a/chrome/service/service_process.h
+++ b/chrome/service/service_process.h
@@ -29,6 +29,8 @@ class CommandLine;
// The ServiceProcess does not inherit from ChildProcess because this
// process can live independently of the browser process.
+// ServiceProcess Design Notes
+// https://sites.google.com/a/chromium.org/dev/developers/design-documents/service-processes
class ServiceProcess : public CloudPrintProxy::Client {
public:
ServiceProcess();
@@ -99,16 +101,22 @@ class ServiceProcess : public CloudPrintProxy::Client {
private:
// Schedule a call to ShutdownIfNeeded.
void ScheduleShutdownCheck();
+
// Shuts down the process if no services are enabled and no clients are
// connected.
void ShutdownIfNeeded();
+
// Called exactly ONCE per process instance for each service that gets
// enabled in this process.
void OnServiceEnabled();
+
// Called exactly ONCE per process instance for each service that gets
// disabled in this process (note that shutdown != disabled).
void OnServiceDisabled();
+ // Terminate forces the service process to quit.
+ void Terminate();
+
scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
scoped_ptr<base::Thread> io_thread_;
scoped_ptr<base::Thread> file_thread_;
« no previous file with comments | « chrome/common/service_process_util_win.cc ('k') | chrome/service/service_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698