[go: nahoru, domu]

blob: ebce0e601419542325d1eb5dcd6fdb1edc62f82a [file] [log] [blame]
jam@chromium.orga54311142011-12-01 05:13:411// 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.
4
5#include "content/public/common/process_type.h"
6
7#include "base/logging.h"
jam@chromium.orgf3b357692013-03-22 05:16:138#include "content/public/common/content_client.h"
jam@chromium.orga54311142011-12-01 05:13:419
10namespace content {
11
jam@chromium.orgf3b357692013-03-22 05:16:1312std::string GetProcessTypeNameInEnglish(int type) {
jam@chromium.orga54311142011-12-01 05:13:4113 switch (type) {
14 case PROCESS_TYPE_BROWSER:
15 return "Browser";
16 case PROCESS_TYPE_RENDERER:
17 return "Tab";
jam@chromium.orga54311142011-12-01 05:13:4118 case PROCESS_TYPE_UTILITY:
19 return "Utility";
jam@chromium.orga54311142011-12-01 05:13:4120 case PROCESS_TYPE_ZYGOTE:
21 return "Zygote";
22 case PROCESS_TYPE_SANDBOX_HELPER:
23 return "Sandbox helper";
jam@chromium.orga54311142011-12-01 05:13:4124 case PROCESS_TYPE_GPU:
25 return "GPU";
26 case PROCESS_TYPE_PPAPI_PLUGIN:
27 return "Pepper Plugin";
28 case PROCESS_TYPE_PPAPI_BROKER:
29 return "Pepper Plugin Broker";
30 case PROCESS_TYPE_UNKNOWN:
jam@chromium.orga54311142011-12-01 05:13:4131 DCHECK(false) << "Unknown child process type!";
32 return "Unknown";
33 }
jam@chromium.orgf3b357692013-03-22 05:16:1334
35 return content::GetContentClient()->GetProcessTypeNameInEnglish(type);
jam@chromium.orga54311142011-12-01 05:13:4136}
37
38} // namespace content