| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_MAC_LAUNCHD_H_ | 5 #ifndef CHROME_COMMON_MAC_LAUNCHD_H_ |
| 6 #define CHROME_COMMON_MAC_LAUNCHD_H_ | 6 #define CHROME_COMMON_MAC_LAUNCHD_H_ |
| 7 | 7 |
| 8 #include <CoreFoundation/CoreFoundation.h> | 8 #include <CoreFoundation/CoreFoundation.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 System = 8 // /System/Library/Launch* | 26 System = 8 // /System/Library/Launch* |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 // TODO(dmaclach): Get rid of this pseudo singleton, and inject it | 29 // TODO(dmaclach): Get rid of this pseudo singleton, and inject it |
| 30 // appropriately wherever it is used. | 30 // appropriately wherever it is used. |
| 31 // http://crbug.com/76925 | 31 // http://crbug.com/76925 |
| 32 static Launchd* GetInstance(); | 32 static Launchd* GetInstance(); |
| 33 | 33 |
| 34 virtual ~Launchd(); | 34 virtual ~Launchd(); |
| 35 | 35 |
| 36 // Return a dictionary with the launchd export settings. | |
| 37 virtual CFDictionaryRef CopyExports(); | |
| 38 | |
| 39 // Return a dictionary with the launchd entries for job labeled |name|. | 36 // Return a dictionary with the launchd entries for job labeled |name|. |
| 40 virtual CFDictionaryRef CopyJobDictionary(CFStringRef label); | 37 virtual CFDictionaryRef CopyJobDictionary(CFStringRef label); |
| 41 | 38 |
| 42 // Return a dictionary for launchd process. | 39 // Return a dictionary for launchd process. |
| 43 virtual CFDictionaryRef CopyDictionaryByCheckingIn(CFErrorRef* error); | 40 virtual CFDictionaryRef CopyDictionaryByCheckingIn(CFErrorRef* error); |
| 44 | 41 |
| 45 // Remove a launchd process from launchd. | 42 // Remove a launchd process from launchd. |
| 46 virtual bool RemoveJob(CFStringRef label, CFErrorRef* error); | 43 virtual bool RemoveJob(CFStringRef label, CFErrorRef* error); |
| 47 | 44 |
| 48 // Used by a process controlled by launchd to restart itself. | 45 // Used by a process controlled by launchd to restart itself. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 private: | 88 private: |
| 92 // TODO(dmaclach): remove this once http://crbug.com/76925 is fixed. | 89 // TODO(dmaclach): remove this once http://crbug.com/76925 is fixed. |
| 93 // Scaffolding for doing unittests with our singleton. | 90 // Scaffolding for doing unittests with our singleton. |
| 94 friend struct DefaultSingletonTraits<Launchd>; | 91 friend struct DefaultSingletonTraits<Launchd>; |
| 95 static Launchd* g_instance_; | 92 static Launchd* g_instance_; |
| 96 | 93 |
| 97 DISALLOW_COPY_AND_ASSIGN(Launchd); | 94 DISALLOW_COPY_AND_ASSIGN(Launchd); |
| 98 }; | 95 }; |
| 99 | 96 |
| 100 #endif // CHROME_COMMON_MAC_LAUNCHD_H_ | 97 #endif // CHROME_COMMON_MAC_LAUNCHD_H_ |
| OLD | NEW |