OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "services/service_manager/embedder/switches.h" | 5 #include "services/service_manager/embedder/switches.h" |
6 | 6 |
7 namespace service_manager { | 7 namespace service_manager { |
8 namespace switches { | 8 namespace switches { |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
11 | 11 |
12 // Prefetch arguments are used by the Windows prefetcher to disambiguate | 12 // Prefetch arguments are used by the Windows prefetcher to disambiguate |
13 // different execution modes (i.e. process types) of the same executable image | 13 // different execution modes (i.e. process types) of the same executable image |
14 // so that different types of processes don't trample each others' prefetch | 14 // so that different types of processes don't trample each others' prefetch |
15 // behavior. | 15 // behavior. |
16 // | 16 // |
17 // Legal values are integers in the range [1, 8]. We reserve 8 to mean | 17 // Legal values are integers in the range [1, 8]. We reserve 8 to mean |
18 // "whatever", and this will ultimately lead to processes with /prefetch:8 | 18 // "whatever", and this will ultimately lead to processes with /prefetch:8 |
19 // having inconsistent behavior thus disabling prefetch in practice. | 19 // having inconsistent behavior thus disabling prefetch in practice. |
20 // | 20 // |
21 // TODO(rockot): Make it possible for embedders to override this argument on a | 21 // TODO(rockot): Make it possible for embedders to override this argument on a |
22 // per-service basis. | 22 // per-service basis. |
23 const char kDefaultServicePrefetchArgument[] = "/prefetch:8"; | 23 const char kDefaultServicePrefetchArgument[] = "/prefetch:8"; |
24 | 24 |
25 #endif // defined(OS_WIN) | 25 #endif // defined(OS_WIN) |
26 | 26 |
| 27 // Disable the in-process stack traces. |
| 28 const char kDisableInProcessStackTraces[] = "disable-in-process-stack-traces"; |
| 29 |
27 // Controls whether console logging is enabled and optionally configures where | 30 // Controls whether console logging is enabled and optionally configures where |
28 // it's routed. | 31 // it's routed. |
29 const char kEnableLogging[] = "enable-logging"; | 32 const char kEnableLogging[] = "enable-logging"; |
30 | 33 |
31 // Indicates the type of process to run. This may be "service-manager", | 34 // Indicates the type of process to run. This may be "service-manager", |
32 // "service", or any other arbitrary value supported by the embedder. | 35 // "service", or any other arbitrary value supported by the embedder. |
33 const char kProcessType[] = "type"; | 36 const char kProcessType[] = "type"; |
34 | 37 |
35 // The value of the |kProcessType| switch which tells the executable to assume | 38 // The value of the |kProcessType| switch which tells the executable to assume |
36 // the role of a standalone Service Manager instance. | 39 // the role of a standalone Service Manager instance. |
37 const char kProcessTypeServiceManager[] = "service-manager"; | 40 const char kProcessTypeServiceManager[] = "service-manager"; |
38 | 41 |
39 // The value of the |kProcessType| switch which tells the executable to assume | 42 // The value of the |kProcessType| switch which tells the executable to assume |
40 // the role of a service instance. | 43 // the role of a service instance. |
41 const char kProcessTypeService[] = "service"; | 44 const char kProcessTypeService[] = "service"; |
42 | 45 |
43 // Describes the file descriptors passed to a child process in the following | 46 // Describes the file descriptors passed to a child process in the following |
44 // list format: | 47 // list format: |
45 // | 48 // |
46 // <file_id>:<descriptor_id>,<file_id>:<descriptor_id>,... | 49 // <file_id>:<descriptor_id>,<file_id>:<descriptor_id>,... |
47 // | 50 // |
48 // where <file_id> is an ID string from the manifest of the service being | 51 // where <file_id> is an ID string from the manifest of the service being |
49 // launched and <descriptor_id> is the numeric identifier of the descriptor for | 52 // launched and <descriptor_id> is the numeric identifier of the descriptor for |
50 // the child process can use to retrieve the file descriptor from the | 53 // the child process can use to retrieve the file descriptor from the |
51 // global descriptor table. | 54 // global descriptor table. |
52 const char kSharedFiles[] = "shared-files"; | 55 const char kSharedFiles[] = "shared-files"; |
53 | 56 |
54 } // namespace switches | 57 } // namespace switches |
55 } // namespace service_manager | 58 } // namespace service_manager |
OLD | NEW |