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

Unified Diff: chrome/common/child_process_info.h

Issue 5981007: fix about:memory and memory histograms to show extensions more clearly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 10 years 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 | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/common/child_process_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/common/child_process_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698