Chromium Code Reviews| Index: components/web_cache/renderer/web_cache_memory_dump_provider.h |
| diff --git a/components/web_cache/renderer/web_cache_memory_dump_provider.h b/components/web_cache/renderer/web_cache_memory_dump_provider.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a0719d9fe742d2ff63f48037e8f3bca3691370e3 |
| --- /dev/null |
| +++ b/components/web_cache/renderer/web_cache_memory_dump_provider.h |
| @@ -0,0 +1,33 @@ |
| +// 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 COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_MEMORY_DUMP_PROVIDER_H |
| +#define COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_MEMORY_DUMP_PROVIDER_H |
| + |
| +#include "base/memory/singleton.h" |
|
Lei Zhang
2015/08/13 18:48:41
"Do you really need a singleton?" as seen in singl
|
| +#include "base/trace_event/memory_dump_provider.h" |
| + |
| +namespace web_cache { |
| + |
| +class WebCacheMemoryDumpProvider |
| + : public base::trace_event::MemoryDumpProvider { |
| + public: |
| + static WebCacheMemoryDumpProvider* GetInstance(); |
| + |
| + // base::trace_event::MemoryDumpProvider implementation. |
| + bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| + base::trace_event::ProcessMemoryDump* pmd) override; |
| + |
| + private: |
| + friend struct DefaultSingletonTraits<WebCacheMemoryDumpProvider>; |
| + |
| + WebCacheMemoryDumpProvider(); |
| + ~WebCacheMemoryDumpProvider() override; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(WebCacheMemoryDumpProvider); |
| +}; |
| + |
| +} // namespace web_cache |
| + |
| +#endif // COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_MEMORY_DUMP_PROVIDER_H |