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

Unified Diff: chrome/browser/memory_details.h

Issue 159777: Add about:memory support for Linux.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/memory_details.h
===================================================================
--- chrome/browser/memory_details.h (revision 22256)
+++ chrome/browser/memory_details.h (working copy)
@@ -17,8 +17,9 @@
// have multiple processes (of course!). Even IE has multiple
// processes these days.
struct ProcessMemoryInformation {
- ProcessMemoryInformation() {
- memset(this, 0, sizeof(ProcessMemoryInformation));
+ ProcessMemoryInformation() : pid(0),
+ num_processes(0),
+ is_diagnostics(false) {
}
// The process id.
@@ -71,18 +72,6 @@
// }
class MemoryDetails : public base::RefCountedThreadSafe<MemoryDetails> {
public:
- // Known browsers which we collect details for.
- enum {
- CHROME_BROWSER = 0,
- IE_BROWSER,
- FIREFOX_BROWSER,
- OPERA_BROWSER,
- SAFARI_BROWSER,
- IE_64BIT_BROWSER,
- KONQUEROR_BROWSER,
- MAX_BROWSERS
- } BrowserProcess;
-
// Constructor.
MemoryDetails();
virtual ~MemoryDetails() {}
@@ -90,7 +79,7 @@
// Access to the process detail information. This is an array
// of MAX_BROWSER ProcessData structures. This data is only available
// after OnDetailsAvailable() has been called.
- ProcessData* processes() { return process_data_; }
+ const std::vector<ProcessData>& processes() { return process_data_; }
// Initiate updating the current memory details. These are fetched
// asynchronously because data must be collected from multiple threads.
@@ -123,7 +112,10 @@
// the global histograms for tracking memory usage.
void UpdateHistograms();
- ProcessData process_data_[MAX_BROWSERS];
+ // Returns a pointer to the ProcessData structure for Chrome.
+ ProcessData* ChromeBrowser();
+
+ std::vector<ProcessData> process_data_;
MessageLoop* ui_loop_;
DISALLOW_EVIL_CONSTRUCTORS(MemoryDetails);

Powered by Google App Engine
This is Rietveld 408576698