Index: chrome/common/child_process_info.h |
diff --git a/chrome/common/child_process_info.h b/chrome/common/child_process_info.h |
index 651978f6525eeedc9744bcf3cd193b0e70707bc9..ba978c3e3cc80eba53282dc09a984214b706e8fc 100644 |
--- a/chrome/common/child_process_info.h |
+++ b/chrome/common/child_process_info.h |
@@ -32,6 +32,17 @@ class ChildProcessInfo { |
PPAPI_PLUGIN_PROCESS |
}; |
+ // NOTE: Do not remove or reorder the elements in this enum, and only add new |
+ // items at the end. We depend on these specific values in a histogram. |
+ // TODO(erikkay) - other possibilities to include background contents, |
+ // interstitials, ChromeOS UI, devtools, etc. |
+ enum RendererProcessType { |
+ RENDERER_UNKNOWN = 0, |
+ RENDERER_NORMAL, |
+ RENDERER_CHROME, |
Mike Belshe
2010/12/24 00:50:53
Could you add a comment about RENDERER_CHROME? I'
Erik does not do reviews
2010/12/28 16:59:18
chrome:// URLs (aka DOMUI, which isn't the cleares
|
+ RENDERER_EXTENSION |
+ }; |
+ |
ChildProcessInfo(const ChildProcessInfo& original); |
virtual ~ChildProcessInfo(); |
@@ -39,6 +50,7 @@ class ChildProcessInfo { |
// Returns the type of the process. |
ProcessType type() const { return type_; } |
+ RendererProcessType renderer_type() const { return renderer_type_; } |
Mike Belshe
2010/12/24 00:50:53
Simple comment:
// Returns the renderer subtype o
Erik does not do reviews
2010/12/28 16:59:18
Done.
|
// Returns the name of the process. i.e. for plugins it might be Flash, while |
// for workers it might be the domain that it's from. |
@@ -60,7 +72,10 @@ class ChildProcessInfo { |
// Returns an English name of the process type, should only be used for non |
// user-visible strings, or debugging pages like about:memory. |
+ static std::string GetFullTypeNameInEnglish(ProcessType type, |
+ RendererProcessType rtype); |
static std::string GetTypeNameInEnglish(ProcessType type); |
+ static std::string GetRendererTypeNameInEnglish(RendererProcessType type); |
// Returns a localized title for the child process. For example, a plugin |
// process would be "Plug-in: Flash" when name is "Flash". |
@@ -99,12 +114,14 @@ class ChildProcessInfo { |
ChildProcessInfo(ProcessType type, int id); |
void set_type(ProcessType type) { type_ = type; } |
+ void set_renderer_type(RendererProcessType type) { renderer_type_ = type; } |
void set_name(const std::wstring& name) { name_ = name; } |
void set_version(const std::wstring& ver) { version_ = ver; } |
void set_handle(base::ProcessHandle handle) { process_.set_handle(handle); } |
private: |
ProcessType type_; |
+ RendererProcessType renderer_type_; |
std::wstring name_; |
std::wstring version_; |
int id_; |