Commit 51e4f33e authored by sque's avatar sque Committed by Commit bot

Mojo interface for Leak Detector on remote process

This interface allows an instance of the Runtime Memory Leak Detector
(components/metrics/leak_detector) to run on a non-browser process, such
as a tab (renderer) process. The interface provides two function APIs:

- GetParams(): Returns the profiling parameters used for initializing
  LeakDetector.
- SendLeakReports(): Passes an array of leak reports in serialized proto
  format (strings) to the browser process, where they can be attached to
  the UMA protobuf.

BUG=chromium:615223
TEST=Build successfully
R=asvitkine@chromium.org

Review-Url: https://codereview.chromium.org/2018983004
Cr-Commit-Position: refs/heads/master@{#396780}
parent 1ee44ea9
......@@ -280,6 +280,16 @@
'metrics/leak_detector/ranked_set.h',
],
},
{
'target_name': 'metrics_mojo_bindings',
'type': 'static_library',
'includes': [
'../mojo/mojom_bindings_generator.gypi',
],
'sources': [
'metrics/leak_detector/leak_detector_remote.mojom',
],
},
],
}],
['OS!="ios"', {
......
......@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
declare_args() {
# Overrides os name in uma metrics log to "Blimp".
metrics_use_blimp = false
......@@ -302,6 +304,14 @@ if (is_linux) {
}
}
if (is_chromeos) {
mojom("interfaces") {
sources = [
"leak_detector/leak_detector_remote.mojom",
]
}
}
if (is_chromeos) {
source_set("leak_detector_unit_tests") {
testonly = true
......
// Copyright 2016 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.
module metrics;
interface LeakDetectorRemote {
GetParams() => (string serialized_params);
SendLeakReports(array<string> serialized_reports);
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment