Chromium Code Reviews| 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 |
|
asargent_no_longer_on_chrome
2010/12/23 21:32:41
Consider adding a unit test that depends on the ex
Erik does not do reviews
2010/12/24 00:52:11
To document our offline conversation:
I agree in p
|
| + // 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, |
| + 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_; } |
| // 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_; |