diff --git a/cobalt/h5vcc/h5vcc_crash_log.cc b/cobalt/h5vcc/h5vcc_crash_log.cc index b3e76e7d93957..39c545c9da233 100644 --- a/cobalt/h5vcc/h5vcc_crash_log.cc +++ b/cobalt/h5vcc/h5vcc_crash_log.cc @@ -191,6 +191,19 @@ std::string H5vccCrashLog::GetWatchdogViolations( return ""; } +script::Sequence H5vccCrashLog::GetWatchdogViolationClients() { + watchdog::Watchdog* watchdog = watchdog::Watchdog::GetInstance(); + script::Sequence client_names; + if (watchdog) { + std::vector client_string_names = + watchdog->GetWatchdogViolationClientNames(); + for (std::size_t i = 0; i < client_string_names.size(); ++i) { + client_names.push_back(client_string_names[i]); + } + } + return client_names; +} + bool H5vccCrashLog::GetPersistentSettingWatchdogEnable() { watchdog::Watchdog* watchdog = watchdog::Watchdog::GetInstance(); if (watchdog) return watchdog->GetPersistentSettingWatchdogEnable(); diff --git a/cobalt/h5vcc/h5vcc_crash_log.h b/cobalt/h5vcc/h5vcc_crash_log.h index ea06c88f7d10b..e01d23e448414 100644 --- a/cobalt/h5vcc/h5vcc_crash_log.h +++ b/cobalt/h5vcc/h5vcc_crash_log.h @@ -81,6 +81,8 @@ class H5vccCrashLog : public script::Wrappable { std::string GetWatchdogViolations( const script::Sequence& clients = {}); + script::Sequence GetWatchdogViolationClients(); + bool GetPersistentSettingWatchdogEnable(); void SetPersistentSettingWatchdogEnable(bool enable_watchdog); diff --git a/cobalt/h5vcc/h5vcc_crash_log.idl b/cobalt/h5vcc/h5vcc_crash_log.idl index 8d4a3baf3b1bd..e60e0abd825ee 100644 --- a/cobalt/h5vcc/h5vcc_crash_log.idl +++ b/cobalt/h5vcc/h5vcc_crash_log.idl @@ -86,6 +86,9 @@ interface H5vccCrashLog { // } DOMString getWatchdogViolations(optional sequence clients); + // Returns a sequence of the client names that have watchdog violations. + sequence getWatchdogViolationClients(); + // Gets a persistent Watchdog setting that determines whether or not Watchdog // is enabled. When disabled, Watchdog behaves like a stub except that // persistent settings can still be get/set. Requires a restart to take