| 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 e98006163fa60231d934be3a3c624f78dbe4fff7..cc54aaaf6abe0aac632cf971780c52d4272b6ff6 100644
|
| --- a/chrome/browser/lifetime/keep_alive_registry.cc
|
| +++ b/chrome/browser/lifetime/keep_alive_registry.cc
|
| @@ -25,6 +25,10 @@ bool KeepAliveRegistry::IsRestartAllowed() const {
|
| return registered_count_ == restart_allowed_count_;
|
| }
|
|
|
| +bool KeepAliveRegistry::IsOriginRegistered(KeepAliveOrigin origin) const {
|
| + return registered_keep_alives_.find(origin) != registered_keep_alives_.end();
|
| +}
|
| +
|
| void KeepAliveRegistry::AddObserver(KeepAliveStateObserver* observer) {
|
| observers_.AddObserver(observer);
|
| }
|
| @@ -103,11 +107,11 @@ void KeepAliveRegistry::OnKeepingAliveChanged(bool new_keeping_alive) {
|
|
|
| if (new_keeping_alive) {
|
| DVLOG(1) << "KeepAliveRegistry is now keeping the browser alive.";
|
| - g_browser_process->AddRefModule();
|
| + g_browser_process->Pin();
|
| } else {
|
| DVLOG(1) << "KeepAliveRegistry stopped keeping the browser alive.";
|
| - g_browser_process->ReleaseModule();
|
| - chrome::CloseAllBrowsersIfNeeded();
|
| + g_browser_process->Unpin();
|
| + chrome::ShutdownIfNeeded();
|
| }
|
| }
|
|
|
|
|