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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 1376063005: Cleanup: Pull some browser keep alive functions into its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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/app_controller_mac.h ('k') | chrome/browser/apps/app_browsertest_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 708f81e0a6f92e0706fe9ebb819bae888ab70354..f3267d21c68a52403441116c562fbe00373b49eb 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -32,6 +32,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/lifetime/browser_keep_alive.h"
#include "chrome/browser/mac/mac_startup_profiler.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/profiles/profile_info_cache_observer.h"
@@ -518,7 +519,7 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
// Tell BrowserList not to keep the browser process alive. Once all the
// browsers get dealloc'd, it will stop the RunLoop and fall back into main().
- chrome::DecrementKeepAliveCount();
+ keep_alive_.reset();
// Reset all pref watching, as this object outlives the prefs system.
profilePrefRegistrar_.reset();
@@ -730,7 +731,7 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
// Notify BrowserList to keep the application running so it doesn't go away
// when all the browser windows get closed.
- chrome::IncrementKeepAliveCount();
+ keep_alive_.reset(new browser_lifetime::ScopedKeepAlive);
[self setUpdateCheckInterval];
« no previous file with comments | « chrome/browser/app_controller_mac.h ('k') | chrome/browser/apps/app_browsertest_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698