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

Unified Diff: components/metrics/BUILD.gn

Issue 1681263003: metrics: Add leak detector controller in Chrome OS metrics system (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use new build flag generation system; Define var 'enable_leak_detector' locally Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: components/metrics/BUILD.gn
diff --git a/components/metrics/BUILD.gn b/components/metrics/BUILD.gn
index 13701ba3e2b6489746c7c90fbf3be3c66e66ea09..56ef4afe176e85fd97c52891e49ea99d79c6c90b 100644
--- a/components/metrics/BUILD.gn
+++ b/components/metrics/BUILD.gn
@@ -2,6 +2,18 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/buildflag_header.gni")
+import("//components/metrics/leak_detector/leak_detector.gni")
+
+buildflag_header("metrics_flags") {
+ header = "metrics_flags.h"
+
+ flags = [
+ # Enable runtime leak detector.
+ "ENABLE_LEAK_DETECTOR=$enable_leak_detector",
+ ]
+}
+
# GYP version: components/metrics.gypi:metrics
source_set("metrics") {
sources = [
@@ -61,6 +73,7 @@ source_set("metrics") {
]
public_deps = [
+ ":metrics_flags",
"//components/metrics/proto",
]
deps = [
@@ -121,6 +134,8 @@ if (is_chromeos) {
"leak_detector/custom_allocator.h",
"leak_detector/leak_analyzer.cc",
"leak_detector/leak_analyzer.h",
+ "leak_detector/leak_detector.cc",
+ "leak_detector/leak_detector.h",
"leak_detector/leak_detector_impl.cc",
"leak_detector/leak_detector_impl.h",
"leak_detector/leak_detector_value_type.cc",
@@ -283,6 +298,7 @@ if (is_chromeos) {
"leak_detector/call_stack_table_unittest.cc",
"leak_detector/leak_analyzer_unittest.cc",
"leak_detector/leak_detector_impl_unittest.cc",
+ "leak_detector/leak_detector_unittest.cc",
"leak_detector/ranked_list_unittest.cc",
]

Powered by Google App Engine
This is Rietveld 408576698