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

Side by Side Diff: components/browser_watcher/stability_debugging.cc

Issue 2861223003: Record keep alive registry's state in stability instrumentation (Closed)
Patch Set: Lighten ifdef comments Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « components/browser_watcher/stability_debugging.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « components/browser_watcher/stability_debugging.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698