summaryrefslogtreecommitdiff
path: root/chromium/services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn
blob: 908dfec2d4c0ed0a31b6826e6e01b8a3158fa6df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright 2018 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.

component("memory_instrumentation") {
  sources = [
    "client_process_impl.cc",
    "client_process_impl.h",
    "global_memory_dump.cc",
    "global_memory_dump.h",
    "memory_instrumentation.cc",
    "memory_instrumentation.h",
    "os_metrics.cc",
    "os_metrics.h",
    "registry.h",
    "tracing_observer.cc",
    "tracing_observer.h",
    "tracing_observer_proto.cc",
    "tracing_observer_proto.h",
    "tracing_observer_traced_value.cc",
    "tracing_observer_traced_value.h",
  ]

  if (is_mac) {
    sources += [ "os_metrics_mac.cc" ]
  }

  if (is_win) {
    sources += [ "os_metrics_win.cc" ]
  }

  if (is_android || is_linux || is_chromeos) {
    sources += [ "os_metrics_linux.cc" ]
  }

  if (is_fuchsia) {
    sources += [ "os_metrics_fuchsia.cc" ]
  }

  defines = [ "IS_RESOURCE_COORDINATOR_PUBLIC_MEMORY_INSTRUMENTATION_IMPL" ]

  deps = []
  if (is_win) {
    deps += [ "//base/win:pe_image" ]
  }

  public_deps = [
    "//base",
    "//mojo/public/cpp/bindings",
    "//services/resource_coordinator/public/mojom",
    "//services/tracing/public/cpp",
  ]
}

source_set("browser") {
  sources = [
    "browser_metrics.cc",
    "browser_metrics.h",
  ]

  deps = [ "//base" ]
}