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

Unified Diff: chrome/browser/lifetime/application_lifetime_aura.cc

Issue 1778873002: Replace Increment/DecrementKeepAliveCount by ScopedKeepAlives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KAObserver
Patch Set: replace the commented dcheck by a dlog Created 4 years, 9 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
Index: chrome/browser/lifetime/application_lifetime_aura.cc
diff --git a/chrome/browser/lifetime/application_lifetime_aura.cc b/chrome/browser/lifetime/application_lifetime_aura.cc
index 12c061388fc069fb622a6b6afef0266e5b5b712d..fd970ca3ac609c03148b9ac1b757780984460941 100644
--- a/chrome/browser/lifetime/application_lifetime_aura.cc
+++ b/chrome/browser/lifetime/application_lifetime_aura.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/browser_process_platform_part.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/common/chrome_switches.h"
#include "ui/aura/client/capture_client.h"
@@ -40,8 +41,8 @@ void HandleAppExitingForPlatform() {
#if defined(OS_CHROMEOS)
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableZeroBrowsersOpenForTests)) {
- // App is exiting, call DecrementKeepAliveCount() on behalf of Aura Shell.
- DecrementKeepAliveCount();
+ // App is exiting, release the keep alive on behalf of Aura Shell.
+ g_browser_process->platform_part()->UnregisterKeepAlive();
// Make sure we have notified the session manager that we are exiting.
// This might be called from FastShutdown() or CloseAllBrowsers(), but not
// if something prevents a browser from closing before SetTryingToQuit()
« no previous file with comments | « chrome/browser/lifetime/application_lifetime.cc ('k') | chrome/browser/lifetime/browser_close_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698