Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / content / common / process_type.cc
blobd3c6894242f7dc9ff3b9905f378f2cc33a51b6ce
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
3 // found in the LICENSE file.
5 #include "content/public/common/process_type.h"
7 #include "base/logging.h"
8 #include "content/public/common/content_client.h"
10 namespace content {
12 std::string GetProcessTypeNameInEnglish(int type) {
13 switch (type) {
14 case PROCESS_TYPE_BROWSER:
15 return "Browser";
16 case PROCESS_TYPE_RENDERER:
17 return "Tab";
18 case PROCESS_TYPE_PLUGIN:
19 return "Plug-in";
20 case PROCESS_TYPE_UTILITY:
21 return "Utility";
22 case PROCESS_TYPE_ZYGOTE:
23 return "Zygote";
24 case PROCESS_TYPE_SANDBOX_HELPER:
25 return "Sandbox helper";
26 case PROCESS_TYPE_GPU:
27 return "GPU";
28 case PROCESS_TYPE_PPAPI_PLUGIN:
29 return "Pepper Plugin";
30 case PROCESS_TYPE_PPAPI_BROKER:
31 return "Pepper Plugin Broker";
32 case PROCESS_TYPE_UNKNOWN:
33 DCHECK(false) << "Unknown child process type!";
34 return "Unknown";
37 return content::GetContentClient()->GetProcessTypeNameInEnglish(type);
40 } // namespace content