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

Side by Side Diff: content/child/web_process_memory_dump_impl.h

Issue 1642023007: Refactoring: Move functions from WebMemoryDumpProviderAdapter to PartitionAllocMemoryDumpProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: primiano's review Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ 5 #ifndef CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_
6 #define CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ 6 #define CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_
7 7
8 #include "base/containers/scoped_ptr_hash_map.h" 8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const blink::WebString& dump_name_prefix) override; 68 const blink::WebString& dump_name_prefix) override;
69 69
70 const base::trace_event::ProcessMemoryDump* process_memory_dump() const { 70 const base::trace_event::ProcessMemoryDump* process_memory_dump() const {
71 return process_memory_dump_; 71 return process_memory_dump_;
72 } 72 }
73 73
74 blink::WebMemoryAllocatorDump* CreateDiscardableMemoryAllocatorDump( 74 blink::WebMemoryAllocatorDump* CreateDiscardableMemoryAllocatorDump(
75 const std::string& name, 75 const std::string& name,
76 base::DiscardableMemory* discardable); 76 base::DiscardableMemory* discardable);
77 77
78 void dumpHeapUsage(
79 const base::hash_map<base::trace_event::AllocationContext, size_t>&
80 bytes_by_context,
81 base::trace_event::TraceEventMemoryOverhead& overhead,
82 const char* allocator_name) override;
83
78 private: 84 private:
79 FRIEND_TEST_ALL_PREFIXES(WebProcessMemoryDumpImplTest, IntegrationTest); 85 FRIEND_TEST_ALL_PREFIXES(WebProcessMemoryDumpImplTest, IntegrationTest);
80 86
81 blink::WebMemoryAllocatorDump* createWebMemoryAllocatorDump( 87 blink::WebMemoryAllocatorDump* createWebMemoryAllocatorDump(
82 base::trace_event::MemoryAllocatorDump* memory_allocator_dump); 88 base::trace_event::MemoryAllocatorDump* memory_allocator_dump);
83 89
84 // Only for the case of ProcessMemoryDump being owned (i.e. the default ctor). 90 // Only for the case of ProcessMemoryDump being owned (i.e. the default ctor).
85 scoped_ptr<base::trace_event::ProcessMemoryDump> owned_process_memory_dump_; 91 scoped_ptr<base::trace_event::ProcessMemoryDump> owned_process_memory_dump_;
86 92
87 // The underlying ProcessMemoryDump instance to which the 93 // The underlying ProcessMemoryDump instance to which the
(...skipping 14 matching lines...) Expand all
102 108
103 // Stores SkTraceMemoryDump for the current ProcessMemoryDump. 109 // Stores SkTraceMemoryDump for the current ProcessMemoryDump.
104 ScopedVector<skia::SkiaTraceMemoryDumpImpl> sk_trace_dump_list_; 110 ScopedVector<skia::SkiaTraceMemoryDumpImpl> sk_trace_dump_list_;
105 111
106 DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDumpImpl); 112 DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDumpImpl);
107 }; 113 };
108 114
109 } // namespace content 115 } // namespace content
110 116
111 #endif // CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ 117 #endif // CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/web_memory_dump_provider_adapter.cc ('k') | content/child/web_process_memory_dump_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698