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

Unified Diff: third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc

Issue 1738843002: Refactoring: Unify WebMemoryAllocatorDump and WebMemoryAllocatorDumpImpl Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebasing) 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc
diff --git a/third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc b/third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc
index 5953f3c14b46730d390d6ecc490d48dd1b375566..4ca7a41ae659fe501e9492d09819b3dda319f0b0 100644
--- a/third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc
+++ b/third_party/WebKit/Source/platform/web_process_memory_dump_impl.cc
@@ -12,7 +12,7 @@
#include "base/trace_event/process_memory_dump.h"
#include "base/trace_event/trace_event_argument.h"
#include "base/trace_event/trace_event_memory_overhead.h"
-#include "platform/web_memory_allocator_dump_impl.h"
+#include "public/platform/WebMemoryAllocatorDump.h"
#include "skia/ext/skia_trace_memory_dump_impl.h"
namespace blink {
@@ -61,14 +61,15 @@ WebProcessMemoryDumpImpl::createWebMemoryAllocatorDump(
return nullptr;
// Wrap it and return to blink.
- WebMemoryAllocatorDumpImpl* web_memory_allocator_dump_impl =
- new WebMemoryAllocatorDumpImpl(memory_allocator_dump);
+ OwnPtr<WebMemoryAllocatorDump> web_memory_allocator_dump =
+ adoptPtr(new WebMemoryAllocatorDump(memory_allocator_dump));
+ auto memory_allocator_dumps_ptr = web_memory_allocator_dump.get();
// memory_allocator_dumps_ will take ownership of
- // |web_memory_allocator_dumpd_impl|.
+ // |web_memory_allocator_dumpd|.
memory_allocator_dumps_.set(
- memory_allocator_dump, adoptPtr(web_memory_allocator_dump_impl));
- return web_memory_allocator_dump_impl;
+ memory_allocator_dump, web_memory_allocator_dump.release());
+ return memory_allocator_dumps_ptr;
}
blink::WebMemoryAllocatorDump* WebProcessMemoryDumpImpl::getMemoryAllocatorDump(

Powered by Google App Engine
This is Rietveld 408576698