Chromium Code Reviews| Index: components/browser_watcher/stability_debugging_win.cc |
| diff --git a/components/browser_watcher/stability_debugging_win.cc b/components/browser_watcher/stability_debugging_win.cc |
| index 3eb4e47b2affb3eac0e7f5a1995dcb4781810dbe..ccc2a416f5be218587e018585735fa2b683b614f 100644 |
| --- a/components/browser_watcher/stability_debugging_win.cc |
| +++ b/components/browser_watcher/stability_debugging_win.cc |
| @@ -6,6 +6,7 @@ |
| #include <string> |
| +#include "base/debug/activity_tracker.h" |
| #include "base/feature_list.h" |
| #include "base/files/file.h" |
| #include "base/metrics/persistent_memory_allocator.h" |
| @@ -85,4 +86,13 @@ void MarkStabilityFileForDeletion(const base::FilePath& user_data_dir) { |
| base::File::FLAG_DELETE_ON_CLOSE); |
| } |
| +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. |
| + base::debug::ActivityUserData& global_user_data = global_tracker->user_data(); |
|
bcwhite
2016/12/01 16:35:20
Blank line above.
manzagop (departed)
2016/12/05 15:44:04
Done.
|
| + global_user_data.SetInt(name, value); |
|
bcwhite
2016/12/01 16:35:20
Skip assigning it to a variable and just call SetI
manzagop (departed)
2016/12/05 15:44:04
Done.
|
| +} |
| + |
| } // namespace browser_watcher |