summaryrefslogtreecommitdiff
path: root/chromium/components/browser_watcher/stability_debugging.cc
blob: 3c8cc6492928043dbe0de2306bef4581e992e044 (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
// 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.

#include "components/browser_watcher/stability_debugging.h"

#include "base/debug/activity_tracker.h"

namespace browser_watcher {

void SetStabilityDataBool(base::StringPiece name, bool value) {
  base::debug::GlobalActivityTracker* global_tracker =
      base::debug::GlobalActivityTracker::Get();
  if (!global_tracker)
    return;  // Activity tracking isn't enabled.

  global_tracker->process_data().SetBool(name, value);
}

void SetStabilityDataInt(base::StringPiece name, int64_t value) {
  base::debug::GlobalActivityTracker* global_tracker =
      base::debug::GlobalActivityTracker::Get();
  if (!global_tracker)
    return;  // Activity tracking isn't enabled.

  global_tracker->process_data().SetInt(name, value);
}

}  // namespace browser_watcher