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

Unified Diff: chrome/browser/memory_details.h

Issue 10151005: cros: Log per-process memory use on low memory events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
diff --git a/chrome/browser/memory_details.h b/chrome/browser/memory_details.h
index 568f591328a4af632411c6d058119e1e8db94596..b5edfe498f419ff7ae027953c229b25b6e345309 100644
--- a/chrome/browser/memory_details.h
+++ b/chrome/browser/memory_details.h
@@ -119,13 +119,20 @@ class MemoryDetails : public base::RefCountedThreadSafe<MemoryDetails> {
// OnDetailsAvailable will be called when this process is complete.
void StartFetch();
- virtual void OnDetailsAvailable() {}
+ virtual void OnDetailsAvailable() = 0;
+
+ // Returns a string summarizing memory usage of the Chrome browser process
+ // and all sub-processes, suitable for logging.
+ std::string ToLogString();
protected:
friend class base::RefCountedThreadSafe<MemoryDetails>;
virtual ~MemoryDetails();
+ // Updates the global histograms for tracking memory usage.
+ void UpdateHistograms();
+
private:
// Collect child process information on the IO thread. This is needed because
// information about some child process types (i.e. plugins) can only be taken
@@ -156,10 +163,6 @@ class MemoryDetails : public base::RefCountedThreadSafe<MemoryDetails> {
// renderer processes is only available there.
void CollectChildInfoOnUIThread();
- // Each time we take a memory sample, we do a little work to update
- // the global histograms for tracking memory usage.
- void UpdateHistograms();
-
// Returns a pointer to the ProcessData structure for Chrome.
ProcessData* ChromeBrowser();

Powered by Google App Engine
This is Rietveld 408576698