Chromium Code Reviews| Index: third_party/WebKit/Source/platform/WebProcessMemoryDumpImpl.h |
| diff --git a/content/child/web_process_memory_dump_impl.h b/third_party/WebKit/Source/platform/WebProcessMemoryDumpImpl.h |
| similarity index 83% |
| rename from content/child/web_process_memory_dump_impl.h |
| rename to third_party/WebKit/Source/platform/WebProcessMemoryDumpImpl.h |
| index 9e7b8707f70eda07c4839015c495bddce5d230d6..94da6acede4931dfbce1621918fefce6418756c7 100644 |
| --- a/content/child/web_process_memory_dump_impl.h |
| +++ b/third_party/WebKit/Source/platform/WebProcessMemoryDumpImpl.h |
| @@ -2,17 +2,16 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ |
| -#define CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ |
| +#ifndef WebProcessMemoryDumpImpl_h |
| +#define WebProcessMemoryDumpImpl_h |
| -#include "base/containers/scoped_ptr_hash_map.h" |
| #include "base/gtest_prod_util.h" |
| #include "base/macros.h" |
| -#include "base/memory/scoped_ptr.h" |
| -#include "base/memory/scoped_vector.h" |
| #include "base/trace_event/memory_dump_request_args.h" |
| -#include "content/common/content_export.h" |
| -#include "third_party/WebKit/public/platform/WebProcessMemoryDump.h" |
| +#include "public/platform/WebProcessMemoryDump.h" |
| +#include "wtf/HashMap.h" |
| +#include "wtf/OwnPtr.h" |
| +#include "wtf/Vector.h" |
| namespace base { |
| class DiscardableMemory; |
| @@ -26,14 +25,14 @@ namespace skia { |
| class SkiaTraceMemoryDumpImpl; |
| } // namespace skia |
| -namespace content { |
| +namespace blink { |
| class WebMemoryAllocatorDumpImpl; |
| // Implements the blink::WebProcessMemoryDump interface by means of proxying the |
| // calls to createMemoryAllocatorDump() to the underlying |
| // base::trace_event::ProcessMemoryDump instance. |
| -class CONTENT_EXPORT WebProcessMemoryDumpImpl final |
| +class BLINK_EXPORT WebProcessMemoryDumpImpl final |
| : public NON_EXPORTED_BASE(blink::WebProcessMemoryDump) { |
| public: |
| // Creates a standalone WebProcessMemoryDumpImp, which owns the underlying |
| @@ -88,7 +87,7 @@ class CONTENT_EXPORT WebProcessMemoryDumpImpl final |
| base::trace_event::MemoryAllocatorDump* memory_allocator_dump); |
| // Only for the case of ProcessMemoryDump being owned (i.e. the default ctor). |
| - scoped_ptr<base::trace_event::ProcessMemoryDump> owned_process_memory_dump_; |
| + WTF::OwnPtr<base::trace_event::ProcessMemoryDump> owned_process_memory_dump_; |
|
haraken
2016/02/15 09:40:49
It looks strange to use WTF::OwnPtr for Chromium c
hajimehoshi
2016/02/18 11:21:53
You mean we should use smart pointers in base for
|
| // The underlying ProcessMemoryDump instance to which the |
| // createMemoryAllocatorDump() calls will be proxied to. |
| @@ -102,16 +101,16 @@ class CONTENT_EXPORT WebProcessMemoryDumpImpl final |
| // to the WebProcessMemoryDump passed as argument of the onMemoryDump() call. |
| // Those pointers are valid only within the scope of the call and can be |
| // safely torn down once the WebProcessMemoryDumpImpl itself is destroyed. |
| - base::ScopedPtrHashMap<base::trace_event::MemoryAllocatorDump*, |
| - scoped_ptr<WebMemoryAllocatorDumpImpl>> |
| + WTF::HashMap<base::trace_event::MemoryAllocatorDump*, |
| + OwnPtr<WebMemoryAllocatorDumpImpl>> |
| memory_allocator_dumps_; |
| // Stores SkTraceMemoryDump for the current ProcessMemoryDump. |
| - ScopedVector<skia::SkiaTraceMemoryDumpImpl> sk_trace_dump_list_; |
| + WTF::Vector<WTF::OwnPtr<skia::SkiaTraceMemoryDumpImpl>> sk_trace_dump_list_; |
|
hajimehoshi
2016/02/18 11:21:53
On the other hand, ScopedVector is not permitted i
|
| DISALLOW_COPY_AND_ASSIGN(WebProcessMemoryDumpImpl); |
| }; |
| -} // namespace content |
| +} // namespace blink |
| -#endif // CONTENT_CHILD_WEB_PROCESS_MEMORY_DUMP_IMPL_H_ |
| +#endif // WebProcessMemoryDumpImpl_h |