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

Side by Side Diff: third_party/WebKit/Source/platform/MemoryCacheDumpProvider.cpp

Issue 1999613002: Move WebCacheMemoryDumpProvider to platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix link error on win Created 4 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "platform/MemoryCacheDumpProvider.h"
6
7 #include "platform/web_process_memory_dump_impl.h"
8 #include "public/platform/WebMemoryDumpProvider.h"
9
10 namespace blink {
11
12 DEFINE_TRACE(MemoryCacheDumpClient)
13 {
14 }
15
16 MemoryCacheDumpProvider* MemoryCacheDumpProvider::instance()
17 {
18 DEFINE_STATIC_LOCAL(MemoryCacheDumpProvider, instance, ());
19 return &instance;
20 }
21
22 bool MemoryCacheDumpProvider::OnMemoryDump(const base::trace_event::MemoryDumpAr gs& args, base::trace_event::ProcessMemoryDump* memoryDump)
23 {
24 DCHECK(isMainThread());
25 if (!m_client)
26 return false;
27
28 WebMemoryDumpLevelOfDetail level;
29 switch (args.level_of_detail) {
30 case base::trace_event::MemoryDumpLevelOfDetail::LIGHT:
31 level = blink::WebMemoryDumpLevelOfDetail::Light;
32 break;
33 case base::trace_event::MemoryDumpLevelOfDetail::DETAILED:
34 level = blink::WebMemoryDumpLevelOfDetail::Detailed;
35 break;
36 default:
37 NOTREACHED();
38 return false;
39 }
40
41 WebProcessMemoryDumpImpl dump(args.level_of_detail, memoryDump);
42 return m_client->onMemoryDump(level, &dump);
43 }
44
45 MemoryCacheDumpProvider::MemoryCacheDumpProvider()
46 {
47 }
48
49 MemoryCacheDumpProvider::~MemoryCacheDumpProvider()
50 {
51 }
52
53 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/MemoryCacheDumpProvider.h ('k') | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698