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"
12 std::string
GetProcessTypeNameInEnglish(int type
) {
14 case PROCESS_TYPE_BROWSER
:
16 case PROCESS_TYPE_RENDERER
:
18 case PROCESS_TYPE_PLUGIN
:
20 case PROCESS_TYPE_WORKER
:
22 case PROCESS_TYPE_UTILITY
:
24 case PROCESS_TYPE_ZYGOTE
:
26 case PROCESS_TYPE_SANDBOX_HELPER
:
27 return "Sandbox helper";
28 case PROCESS_TYPE_GPU
:
30 case PROCESS_TYPE_PPAPI_PLUGIN
:
31 return "Pepper Plugin";
32 case PROCESS_TYPE_PPAPI_BROKER
:
33 return "Pepper Plugin Broker";
34 case PROCESS_TYPE_UNKNOWN
:
35 DCHECK(false) << "Unknown child process type!";
39 return content::GetContentClient()->GetProcessTypeNameInEnglish(type
);
42 } // namespace content