Chromium Code Reviews| Index: gin/v8_isolate_memory_dump_provider.h |
| diff --git a/gin/v8_isolate_memory_dump_provider.h b/gin/v8_isolate_memory_dump_provider.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..16be579633ca3ed74c2bd041621a4d09905cb720 |
| --- /dev/null |
| +++ b/gin/v8_isolate_memory_dump_provider.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef GIN_PUBLIC_V8_ISOLATE_MEMORY_DUMP_PROVIDER_H_ |
|
Primiano Tucci (use gerrit)
2015/04/17 19:10:31
Fix this (remove PUBLIC)
|
| +#define GIN_PUBLIC_V8_ISOLATE_MEMORY_DUMP_PROVIDER_H_ |
| + |
| +#include <istream> |
|
Primiano Tucci (use gerrit)
2015/04/17 19:10:31
I don't think you need this
|
| + |
| +#include "base/memory/scoped_ptr.h" |
|
Primiano Tucci (use gerrit)
2015/04/17 19:10:31
don't need this either
|
| +#include "base/trace_event/memory_dump_manager.h" |
|
Primiano Tucci (use gerrit)
2015/04/17 19:10:31
Neither this.
|
| +#include "base/trace_event/memory_dump_provider.h" |
| +#include "gin/gin_export.h" |
| + |
| +namespace gin { |
| + |
| +class IsolateHolder; |
| + |
| +// Dump provider which collects process-wide memory stats. |
|
Primiano Tucci (use gerrit)
2015/04/17 19:10:31
I'd probably word this as:
// Memory dump provider
|
| +class V8IsolateMemoryDumpProvider |
| + : public base::trace_event::MemoryDumpProvider { |
| + public: |
| + V8IsolateMemoryDumpProvider(IsolateHolder* isolate_holder); |
| + ~V8IsolateMemoryDumpProvider() override; |
| + |
| + // MemoryDumpProvider implementation. |
| + bool DumpInto(base::trace_event::ProcessMemoryDump* pmd) override; |
| + const char* GetFriendlyName() const override; |
| + |
| + private: |
| + // This object is not owned by the IsolateHolder whose reference |
| + // is stored in this member. |
| + IsolateHolder* isolate_holder_; |
|
Primiano Tucci (use gerrit)
2015/04/17 19:10:31
It is sufficient to say:
IsolateHolder* isolate_ho
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(V8IsolateMemoryDumpProvider); |
| +}; |
| + |
| +} // namespace gin |
| + |
| +#endif // GIN_PUBLIC_V8_ISOLATE_MEMORY_DUMP_PROVIDER_H_ |