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

Side by Side Diff: third_party/WebKit/Source/platform/web_process_memory_dump.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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 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 WebProcessMemoryDump_h 5 #ifndef WebProcessMemoryDump_h
6 #define WebProcessMemoryDump_h 6 #define WebProcessMemoryDump_h
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/trace_event/heap_profiler_allocation_context.h" 10 #include "base/trace_event/heap_profiler_allocation_context.h"
11 #include "base/trace_event/memory_dump_request_args.h" 11 #include "base/trace_event/memory_dump_request_args.h"
12 #include "platform/PlatformExport.h" 12 #include "platform/PlatformExport.h"
13 #include "platform/web_memory_allocator_dump.h" 13 #include "platform/web_memory_allocator_dump.h"
14 #include "wtf/HashMap.h" 14 #include "wtf/HashMap.h"
15 #include "wtf/OwnPtr.h"
16 #include "wtf/text/WTFString.h" 15 #include "wtf/text/WTFString.h"
17
18 #include <map> 16 #include <map>
19 #include <memory> 17 #include <memory>
20 #include <vector> 18 #include <vector>
21 19
22 class SkTraceMemoryDump; 20 class SkTraceMemoryDump;
23 21
24 namespace base { 22 namespace base {
25 class DiscardableMemory; 23 class DiscardableMemory;
26 namespace trace_event { 24 namespace trace_event {
27 class MemoryAllocatorDump; 25 class MemoryAllocatorDump;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 149
152 // TODO(ssid): Remove it once this information is added to ProcessMemoryDump. 150 // TODO(ssid): Remove it once this information is added to ProcessMemoryDump.
153 base::trace_event::MemoryDumpLevelOfDetail level_of_detail_; 151 base::trace_event::MemoryDumpLevelOfDetail level_of_detail_;
154 152
155 // Reverse index of MemoryAllocatorDump -> WebMemoryAllocatorDump wrapper. 153 // Reverse index of MemoryAllocatorDump -> WebMemoryAllocatorDump wrapper.
156 // By design WebMemoryDumpProvider(s) are not supposed to hold the pointer 154 // By design WebMemoryDumpProvider(s) are not supposed to hold the pointer
157 // to the WebProcessMemoryDump passed as argument of the onMemoryDump() call. 155 // to the WebProcessMemoryDump passed as argument of the onMemoryDump() call.
158 // Those pointers are valid only within the scope of the call and can be 156 // Those pointers are valid only within the scope of the call and can be
159 // safely torn down once the WebProcessMemoryDump itself is destroyed. 157 // safely torn down once the WebProcessMemoryDump itself is destroyed.
160 HashMap<base::trace_event::MemoryAllocatorDump*, 158 HashMap<base::trace_event::MemoryAllocatorDump*,
161 OwnPtr<WebMemoryAllocatorDump>> memory_allocator_dumps_; 159 std::unique_ptr<WebMemoryAllocatorDump>> memory_allocator_dumps_;
162 160
163 // Stores SkTraceMemoryDump for the current ProcessMemoryDump. 161 // Stores SkTraceMemoryDump for the current ProcessMemoryDump.
164 std::vector<std::unique_ptr<skia::SkiaTraceMemoryDumpImpl>> sk_trace_dump_list _; 162 std::vector<std::unique_ptr<skia::SkiaTraceMemoryDumpImpl>> sk_trace_dump_list _;
165 163
166 DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDump); 164 DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDump);
167 }; 165 };
168 166
169 } // namespace blink 167 } // namespace blink
170 168
171 #endif // WebProcessMemoryDump_h 169 #endif // WebProcessMemoryDump_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698