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 #include "content/public/common/process_type.h" | 5 #include "content/public/common/process_type.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/public/common/content_client.h" |
8 | 9 |
9 namespace content { | 10 namespace content { |
10 | 11 |
11 std::string GetProcessTypeNameInEnglish(ProcessType type) { | 12 std::string GetProcessTypeNameInEnglish(int type) { |
12 switch (type) { | 13 switch (type) { |
13 case PROCESS_TYPE_BROWSER: | 14 case PROCESS_TYPE_BROWSER: |
14 return "Browser"; | 15 return "Browser"; |
15 case PROCESS_TYPE_RENDERER: | 16 case PROCESS_TYPE_RENDERER: |
16 return "Tab"; | 17 return "Tab"; |
17 case PROCESS_TYPE_PLUGIN: | 18 case PROCESS_TYPE_PLUGIN: |
18 return "Plug-in"; | 19 return "Plug-in"; |
19 case PROCESS_TYPE_WORKER: | 20 case PROCESS_TYPE_WORKER: |
20 return "Web Worker"; | 21 return "Web Worker"; |
21 case PROCESS_TYPE_UTILITY: | 22 case PROCESS_TYPE_UTILITY: |
22 return "Utility"; | 23 return "Utility"; |
23 case PROCESS_TYPE_PROFILE_IMPORT: | |
24 return "Profile Import helper"; | |
25 case PROCESS_TYPE_ZYGOTE: | 24 case PROCESS_TYPE_ZYGOTE: |
26 return "Zygote"; | 25 return "Zygote"; |
27 case PROCESS_TYPE_SANDBOX_HELPER: | 26 case PROCESS_TYPE_SANDBOX_HELPER: |
28 return "Sandbox helper"; | 27 return "Sandbox helper"; |
29 case PROCESS_TYPE_NACL_LOADER: | |
30 return "Native Client module"; | |
31 case PROCESS_TYPE_NACL_BROKER: | |
32 return "Native Client broker"; | |
33 case PROCESS_TYPE_GPU: | 28 case PROCESS_TYPE_GPU: |
34 return "GPU"; | 29 return "GPU"; |
35 case PROCESS_TYPE_PPAPI_PLUGIN: | 30 case PROCESS_TYPE_PPAPI_PLUGIN: |
36 return "Pepper Plugin"; | 31 return "Pepper Plugin"; |
37 case PROCESS_TYPE_PPAPI_BROKER: | 32 case PROCESS_TYPE_PPAPI_BROKER: |
38 return "Pepper Plugin Broker"; | 33 return "Pepper Plugin Broker"; |
39 case PROCESS_TYPE_UNKNOWN: | 34 case PROCESS_TYPE_UNKNOWN: |
40 default: | |
41 DCHECK(false) << "Unknown child process type!"; | 35 DCHECK(false) << "Unknown child process type!"; |
42 return "Unknown"; | 36 return "Unknown"; |
43 } | 37 } |
| 38 |
| 39 return content::GetContentClient()->GetProcessTypeNameInEnglish(type); |
44 } | 40 } |
45 | 41 |
46 } // namespace content | 42 } // namespace content |
OLD | NEW |