Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Unified Diff: content/common/process_type.cc

Issue 8757014: Move GetProcessTypeNameInEnglish beside the ProcessType enum where it belongs. This also helps re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/child_process_info.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/process_type.cc
===================================================================
--- content/common/process_type.cc (revision 0)
+++ content/common/process_type.cc (revision 0)
@@ -0,0 +1,46 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/common/process_type.h"
+
+#include "base/logging.h"
+
+namespace content {
+
+std::string GetProcessTypeNameInEnglish(ProcessType type) {
+ switch (type) {
+ case PROCESS_TYPE_BROWSER:
+ return "Browser";
+ case PROCESS_TYPE_RENDERER:
+ return "Tab";
+ case PROCESS_TYPE_PLUGIN:
+ return "Plug-in";
+ case PROCESS_TYPE_WORKER:
+ return "Web Worker";
+ case PROCESS_TYPE_UTILITY:
+ return "Utility";
+ case PROCESS_TYPE_PROFILE_IMPORT:
+ return "Profile Import helper";
+ case PROCESS_TYPE_ZYGOTE:
+ return "Zygote";
+ case PROCESS_TYPE_SANDBOX_HELPER:
+ return "Sandbox helper";
+ case PROCESS_TYPE_NACL_LOADER:
+ return "Native Client module";
+ case PROCESS_TYPE_NACL_BROKER:
+ return "Native Client broker";
+ case PROCESS_TYPE_GPU:
+ return "GPU";
+ case PROCESS_TYPE_PPAPI_PLUGIN:
+ return "Pepper Plugin";
+ case PROCESS_TYPE_PPAPI_BROKER:
+ return "Pepper Plugin Broker";
+ case PROCESS_TYPE_UNKNOWN:
+ default:
+ DCHECK(false) << "Unknown child process type!";
+ return "Unknown";
+ }
+}
+
+} // namespace content
Property changes on: content\common\process_type.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « content/common/child_process_info.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698