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

Side by Side Diff: content/common/process_type.cc

Issue 283313002: Ensure that any IPC sent from a child process that couldn't be deserialized causes that p… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 7 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "content/public/common/content_client.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 std::string GetProcessTypeNameInEnglish(int type) { 12 std::string GetProcessTypeNameInEnglish(int type) {
13 // If any of these names are changed or new ones added, update
Tom Sepez 2014/05/15 19:57:42 If we added GetProcessTypeNameForUMA here, it coul
14 // extract_action.py's AddBadMessageActions.
13 switch (type) { 15 switch (type) {
14 case PROCESS_TYPE_BROWSER: 16 case PROCESS_TYPE_BROWSER:
15 return "Browser"; 17 return "Browser";
16 case PROCESS_TYPE_RENDERER: 18 case PROCESS_TYPE_RENDERER:
17 return "Tab"; 19 return "Tab";
18 case PROCESS_TYPE_PLUGIN: 20 case PROCESS_TYPE_PLUGIN:
19 return "Plug-in"; 21 return "Plug-in";
20 case PROCESS_TYPE_WORKER: 22 case PROCESS_TYPE_WORKER:
21 return "Web Worker"; 23 return "Web Worker";
22 case PROCESS_TYPE_UTILITY: 24 case PROCESS_TYPE_UTILITY:
(...skipping 10 matching lines...) Expand all
33 return "Pepper Plugin Broker"; 35 return "Pepper Plugin Broker";
34 case PROCESS_TYPE_UNKNOWN: 36 case PROCESS_TYPE_UNKNOWN:
35 DCHECK(false) << "Unknown child process type!"; 37 DCHECK(false) << "Unknown child process type!";
36 return "Unknown"; 38 return "Unknown";
37 } 39 }
38 40
39 return content::GetContentClient()->GetProcessTypeNameInEnglish(type); 41 return content::GetContentClient()->GetProcessTypeNameInEnglish(type);
40 } 42 }
41 43
42 } // namespace content 44 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698