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

Side by Side Diff: services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.h

Issue 2828333002: Revert of [Memory UMA] Return the extra_processes_dump map as part of the ResponseCallback (Closed)
Patch Set: Created 3 years, 8 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATION_S TRUCT_TRAITS_H_ 5 #ifndef SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATION_S TRUCT_TRAITS_H_
6 #define SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATION_S TRUCT_TRAITS_H_ 6 #define SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATION_S TRUCT_TRAITS_H_
7 7
8 #include "base/process/process_handle.h"
9 #include "base/trace_event/memory_dump_request_args.h" 8 #include "base/trace_event/memory_dump_request_args.h"
10 #include "mojo/common/common_custom_types_struct_traits.h"
11 #include "services/resource_coordinator/public/interfaces/memory/memory_instrume ntation.mojom.h" 9 #include "services/resource_coordinator/public/interfaces/memory/memory_instrume ntation.mojom.h"
12 10
13 namespace mojo { 11 namespace mojo {
14 12
15 template <> 13 template <>
16 struct EnumTraits<memory_instrumentation::mojom::DumpType, 14 struct EnumTraits<memory_instrumentation::mojom::DumpType,
17 base::trace_event::MemoryDumpType> { 15 base::trace_event::MemoryDumpType> {
18 static memory_instrumentation::mojom::DumpType ToMojom( 16 static memory_instrumentation::mojom::DumpType ToMojom(
19 base::trace_event::MemoryDumpType type); 17 base::trace_event::MemoryDumpType type);
20 static bool FromMojom(memory_instrumentation::mojom::DumpType input, 18 static bool FromMojom(memory_instrumentation::mojom::DumpType input,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 memory_instrumentation::mojom::MemoryDumpCallbackResultDataView, 88 memory_instrumentation::mojom::MemoryDumpCallbackResultDataView,
91 base::trace_event::MemoryDumpCallbackResult> { 89 base::trace_event::MemoryDumpCallbackResult> {
92 static base::trace_event::MemoryDumpCallbackResult::OSMemDump os_dump( 90 static base::trace_event::MemoryDumpCallbackResult::OSMemDump os_dump(
93 const base::trace_event::MemoryDumpCallbackResult& args) { 91 const base::trace_event::MemoryDumpCallbackResult& args) {
94 return args.os_dump; 92 return args.os_dump;
95 } 93 }
96 static base::trace_event::MemoryDumpCallbackResult::ChromeMemDump chrome_dump( 94 static base::trace_event::MemoryDumpCallbackResult::ChromeMemDump chrome_dump(
97 const base::trace_event::MemoryDumpCallbackResult& args) { 95 const base::trace_event::MemoryDumpCallbackResult& args) {
98 return args.chrome_dump; 96 return args.chrome_dump;
99 } 97 }
100 static const std::map<base::ProcessId,
101 base::trace_event::MemoryDumpCallbackResult::OSMemDump>&
102 extra_processes_dump(
103 const base::trace_event::MemoryDumpCallbackResult& args) {
104 return args.extra_processes_dump;
105 }
106 static bool Read( 98 static bool Read(
107 memory_instrumentation::mojom::MemoryDumpCallbackResultDataView input, 99 memory_instrumentation::mojom::MemoryDumpCallbackResultDataView input,
108 base::trace_event::MemoryDumpCallbackResult* out); 100 base::trace_event::MemoryDumpCallbackResult* out);
109 }; 101 };
110 102
111 } // namespace mojo 103 } // namespace mojo
112 104
113 #endif // SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATIO N_STRUCT_TRAITS_H_ 105 #endif // SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_MEMORY_INSTRUMENTATIO N_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « mojo/common/typemaps.gni ('k') | services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698