| Index: services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.cc
|
| diff --git a/services/memory_instrumentation/public/cpp/memory_instrumentation_traits.cc b/services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.cc
|
| similarity index 76%
|
| rename from services/memory_instrumentation/public/cpp/memory_instrumentation_traits.cc
|
| rename to services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.cc
|
| index ed2ef6c76eee02cbb2736c7f1d7f794deb85bfca..c1ad69010d894d9fcdeb59725933ae9a5a0ec76c 100644
|
| --- a/services/memory_instrumentation/public/cpp/memory_instrumentation_traits.cc
|
| +++ b/services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.cc
|
| @@ -2,18 +2,18 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "services/memory_instrumentation/public/cpp/memory_instrumentation_traits.h"
|
| +#include "services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.h"
|
|
|
| #include "base/trace_event/memory_dump_request_args.h"
|
| -#include "services/memory_instrumentation/public/interfaces/memory_instrumentation.mojom.h"
|
| +#include "services/resource_coordinator/public/interfaces/memory/memory_instrumentation.mojom.h"
|
|
|
| namespace mojo {
|
|
|
| -//static
|
| +// static
|
| memory_instrumentation::mojom::DumpType
|
| EnumTraits<memory_instrumentation::mojom::DumpType,
|
| - base::trace_event::MemoryDumpType>::ToMojom(
|
| - base::trace_event::MemoryDumpType type) {
|
| + base::trace_event::MemoryDumpType>::
|
| + ToMojom(base::trace_event::MemoryDumpType type) {
|
| switch (type) {
|
| case base::trace_event::MemoryDumpType::PERIODIC_INTERVAL:
|
| return memory_instrumentation::mojom::DumpType::PERIODIC_INTERVAL;
|
| @@ -28,11 +28,11 @@ EnumTraits<memory_instrumentation::mojom::DumpType,
|
| }
|
| }
|
|
|
| -//static
|
| +// static
|
| bool EnumTraits<memory_instrumentation::mojom::DumpType,
|
| - base::trace_event::MemoryDumpType>::FromMojom(
|
| - memory_instrumentation::mojom::DumpType input,
|
| - base::trace_event::MemoryDumpType* out) {
|
| + base::trace_event::MemoryDumpType>::
|
| + FromMojom(memory_instrumentation::mojom::DumpType input,
|
| + base::trace_event::MemoryDumpType* out) {
|
| switch (input) {
|
| case memory_instrumentation::mojom::DumpType::PERIODIC_INTERVAL:
|
| *out = base::trace_event::MemoryDumpType::PERIODIC_INTERVAL;
|
| @@ -50,11 +50,11 @@ bool EnumTraits<memory_instrumentation::mojom::DumpType,
|
| return true;
|
| }
|
|
|
| -//static
|
| +// static
|
| memory_instrumentation::mojom::LevelOfDetail
|
| EnumTraits<memory_instrumentation::mojom::LevelOfDetail,
|
| - base::trace_event::MemoryDumpLevelOfDetail>::ToMojom(
|
| - base::trace_event::MemoryDumpLevelOfDetail level_of_detail) {
|
| + base::trace_event::MemoryDumpLevelOfDetail>::
|
| + ToMojom(base::trace_event::MemoryDumpLevelOfDetail level_of_detail) {
|
| switch (level_of_detail) {
|
| case base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND:
|
| return memory_instrumentation::mojom::LevelOfDetail::BACKGROUND;
|
| @@ -69,11 +69,11 @@ EnumTraits<memory_instrumentation::mojom::LevelOfDetail,
|
| }
|
| }
|
|
|
| -//static
|
| +// static
|
| bool EnumTraits<memory_instrumentation::mojom::LevelOfDetail,
|
| - base::trace_event::MemoryDumpLevelOfDetail>::FromMojom(
|
| - memory_instrumentation::mojom::LevelOfDetail input,
|
| - base::trace_event::MemoryDumpLevelOfDetail* out) {
|
| + base::trace_event::MemoryDumpLevelOfDetail>::
|
| + FromMojom(memory_instrumentation::mojom::LevelOfDetail input,
|
| + base::trace_event::MemoryDumpLevelOfDetail* out) {
|
| switch (input) {
|
| case memory_instrumentation::mojom::LevelOfDetail::BACKGROUND:
|
| *out = base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND;
|
| @@ -91,11 +91,11 @@ bool EnumTraits<memory_instrumentation::mojom::LevelOfDetail,
|
| return true;
|
| }
|
|
|
| -//static
|
| +// static
|
| bool StructTraits<memory_instrumentation::mojom::RequestArgsDataView,
|
| - base::trace_event::MemoryDumpRequestArgs>::Read(
|
| - memory_instrumentation::mojom::RequestArgsDataView input,
|
| - base::trace_event::MemoryDumpRequestArgs* out) {
|
| + base::trace_event::MemoryDumpRequestArgs>::
|
| + Read(memory_instrumentation::mojom::RequestArgsDataView input,
|
| + base::trace_event::MemoryDumpRequestArgs* out) {
|
| out->dump_guid = input.dump_guid();
|
| if (!input.ReadDumpType(&out->dump_type))
|
| return false;
|
|
|