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

Unified Diff: chrome/browser/lifetime/keep_alive_registry.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/lifetime/keep_alive_registry.h ('k') | components/browser_watcher/stability_data_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/lifetime/keep_alive_registry.cc
diff --git a/chrome/browser/lifetime/keep_alive_registry.cc b/chrome/browser/lifetime/keep_alive_registry.cc
index f61ef82706df2cd271f97e0e78fa3266f35d7a13..bebc5c1209080ae9a791f93bf2715b59dc5777ff 100644
--- a/chrome/browser/lifetime/keep_alive_registry.cc
+++ b/chrome/browser/lifetime/keep_alive_registry.cc
@@ -4,11 +4,17 @@
#include "chrome/browser/lifetime/keep_alive_registry.h"
+#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/lifetime/keep_alive_state_observer.h"
#include "chrome/browser/lifetime/keep_alive_types.h"
+#if defined(OS_WIN)
+#include "components/browser_watcher/stability_data_names.h"
+#include "components/browser_watcher/stability_debugging.h"
+#endif
+
////////////////////////////////////////////////////////////////////////////////
// Public methods
@@ -136,6 +142,10 @@ void KeepAliveRegistry::Unregister(KeepAliveOrigin origin,
void KeepAliveRegistry::OnKeepAliveStateChanged(bool new_keeping_alive) {
DVLOG(1) << "Notifying KeepAliveStateObservers: KeepingAlive changed to: "
<< new_keeping_alive;
+#if defined(OS_WIN)
+ browser_watcher::SetStabilityDataBool(browser_watcher::kStabilityKeepAlive,
+ new_keeping_alive);
+#endif
for (KeepAliveStateObserver& observer : observers_)
observer.OnKeepAliveStateChanged(new_keeping_alive);
}
@@ -143,6 +153,10 @@ void KeepAliveRegistry::OnKeepAliveStateChanged(bool new_keeping_alive) {
void KeepAliveRegistry::OnRestartAllowedChanged(bool new_restart_allowed) {
DVLOG(1) << "Notifying KeepAliveStateObservers: Restart changed to: "
<< new_restart_allowed;
+#if defined(OS_WIN)
+ browser_watcher::SetStabilityDataBool(
+ browser_watcher::kStabilityRestartAllowed, new_restart_allowed);
+#endif
for (KeepAliveStateObserver& observer : observers_)
observer.OnKeepAliveRestartStateChanged(new_restart_allowed);
}
« no previous file with comments | « chrome/browser/lifetime/keep_alive_registry.h ('k') | components/browser_watcher/stability_data_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698