| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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 #ifndef COMPONENTS_METRICS_LEAK_DETECTOR_PROTOBUF_TO_MOJO_CONVERTER_H_ | |
| 6 #define COMPONENTS_METRICS_LEAK_DETECTOR_PROTOBUF_TO_MOJO_CONVERTER_H_ | |
| 7 | |
| 8 #include "components/metrics/leak_detector/leak_detector.mojom.h" | |
| 9 #include "components/metrics/proto/memory_leak_report.pb.h" | |
| 10 | |
| 11 namespace metrics { | |
| 12 namespace leak_detector { | |
| 13 namespace protobuf_to_mojo_converter { | |
| 14 | |
| 15 // Converts between a MemoryLeakReportProto::Params protobuf and a | |
| 16 // mojom::LeakDetectorParams Mojo structure. The Mojo structure must already be | |
| 17 // allocated. | |
| 18 void ParamsToMojo(const MemoryLeakReportProto::Params& params, | |
| 19 mojom::LeakDetectorParams* mojo_params); | |
| 20 void MojoToParams(const mojom::LeakDetectorParams& mojo_params, | |
| 21 MemoryLeakReportProto::Params* params); | |
| 22 | |
| 23 // Converts between a MemoryLeakReportProto protobuf and a | |
| 24 // mojom::MemoryLeakReport Mojo structure. The Mojo structure must already be | |
| 25 // allocated. The conversion only covers the fields that are filled in by the | |
| 26 // LeakDetector class. | |
| 27 void ReportToMojo(const MemoryLeakReportProto& report, | |
| 28 mojom::MemoryLeakReport* mojo_report); | |
| 29 void MojoToReport(const mojom::MemoryLeakReport& mojo_report, | |
| 30 MemoryLeakReportProto* report); | |
| 31 | |
| 32 } // namespace protobuf_to_mojo_converter | |
| 33 } // namespace leak_detector | |
| 34 } // namespace metrics | |
| 35 | |
| 36 #endif // COMPONENTS_METRICS_LEAK_DETECTOR_PROTOBUF_TO_MOJO_CONVERTER_H_ | |
| OLD | NEW |