| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/browser_watcher/stability_debugging.h" | 5 #include "components/browser_watcher/stability_debugging.h" |
| 6 | 6 |
| 7 #include "base/debug/activity_tracker.h" | 7 #include "base/debug/activity_tracker.h" |
| 8 | 8 |
| 9 namespace browser_watcher { | 9 namespace browser_watcher { |
| 10 | 10 |
| 11 void 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 |
| 11 void SetStabilityDataInt(base::StringPiece name, int64_t value) { | 20 void SetStabilityDataInt(base::StringPiece name, int64_t value) { |
| 12 base::debug::GlobalActivityTracker* global_tracker = | 21 base::debug::GlobalActivityTracker* global_tracker = |
| 13 base::debug::GlobalActivityTracker::Get(); | 22 base::debug::GlobalActivityTracker::Get(); |
| 14 if (!global_tracker) | 23 if (!global_tracker) |
| 15 return; // Activity tracking isn't enabled. | 24 return; // Activity tracking isn't enabled. |
| 16 | 25 |
| 17 global_tracker->process_data().SetInt(name, value); | 26 global_tracker->process_data().SetInt(name, value); |
| 18 } | 27 } |
| 19 | 28 |
| 20 } // namespace browser_watcher | 29 } // namespace browser_watcher |
| OLD | NEW |