blob: 3c8cc6492928043dbe0de2306bef4581e992e044 [file] [log] [blame]
manzagopf2322662016-09-27 11:39:591// 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
manzagop6d149912016-12-19 20:17:095#include "components/browser_watcher/stability_debugging.h"
manzagopf2322662016-09-27 11:39:596
manzagop6d149912016-12-19 20:17:097#include "base/debug/activity_tracker.h"
manzagopf2322662016-09-27 11:39:598
9namespace browser_watcher {
10
manzagopba8991e2017-05-08 21:05:2111void SetStabilityDataBool(base::StringPiece name, bool value) {
12 base::debug::GlobalActivityTracker* global_tracker =
13 base::debug::GlobalActivityTracker::Get();
14 if (!global_tracker)
15 return; // Activity tracking isn't enabled.
16
17 global_tracker->process_data().SetBool(name, value);
18}
19
manzagop6d149912016-12-19 20:17:0920void SetStabilityDataInt(base::StringPiece name, int64_t value) {
21 base::debug::GlobalActivityTracker* global_tracker =
22 base::debug::GlobalActivityTracker::Get();
23 if (!global_tracker)
24 return; // Activity tracking isn't enabled.
25
bcwhite8ffd3902017-04-11 17:10:4926 global_tracker->process_data().SetInt(name, value);
manzagop6d149912016-12-19 20:17:0927}
manzagop14aff5d2016-11-23 17:27:0028
manzagopf2322662016-09-27 11:39:5929} // namespace browser_watcher