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

Unified Diff: memory/discardable_memory.h

Issue 2045303002: Update to Chromium //base at Chromium commit 3e81715e6d3a4324362635aea46ce1f1a163cca1. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/domokit/base@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « files/OWNERS ('k') | message_loop/message_pump_default.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: memory/discardable_memory.h
diff --git a/memory/discardable_memory.h b/memory/discardable_memory.h
index fc189e746341136d0190e0329d3c375be8500af2..c64fc4f7cf37af8feddd50ace45fe496d2ffca48 100644
--- a/memory/discardable_memory.h
+++ b/memory/discardable_memory.h
@@ -11,6 +11,11 @@
namespace base {
+namespace trace_event {
+class MemoryAllocatorDump;
+class ProcessMemoryDump;
+}
+
// Discardable memory is used to cache large objects without worrying about
// blowing out memory, both on mobile devices where there is no swap, and
// desktop devices where unused free memory should be used to help the user
@@ -59,6 +64,14 @@ class BASE_EXPORT DiscardableMemory {
template<typename T> T* data_as() const {
return reinterpret_cast<T*>(data());
}
+
+ // Used for dumping the statistics of discardable memory allocated in tracing.
+ // Returns a new MemoryAllocatorDump in the |pmd| with the size of the
+ // discardable memory. The MemoryAllocatorDump created is owned by |pmd|. See
+ // ProcessMemoryDump::CreateAllocatorDump.
+ virtual trace_event::MemoryAllocatorDump* CreateMemoryAllocatorDump(
+ const char* name,
+ trace_event::ProcessMemoryDump* pmd) const = 0;
};
} // namespace base
« no previous file with comments | « files/OWNERS ('k') | message_loop/message_pump_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698