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

Unified Diff: chrome/browser/browser_process_platform_part_chromeos.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/browser_process_platform_part_chromeos.cc
diff --git a/chrome/browser/browser_process_platform_part_chromeos.cc b/chrome/browser/browser_process_platform_part_chromeos.cc
index 254d379f79283339fab23591e00ed9fd574e7639..7e6b13c441c341466141d96b0b599cf440be9279 100644
--- a/chrome/browser/browser_process_platform_part_chromeos.cc
+++ b/chrome/browser/browser_process_platform_part_chromeos.cc
@@ -20,6 +20,8 @@
#include "chrome/browser/chromeos/system/device_disabling_manager_default_delegate.h"
#include "chrome/browser/chromeos/system/system_clock.h"
#include "chrome/browser/chromeos/system/timezone_util.h"
+#include "chrome/browser/lifetime/keep_alive_types.h"
+#include "chrome/browser/lifetime/scoped_keep_alive.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
#include "chromeos/geolocation/simple_geolocation_provider.h"
@@ -91,6 +93,17 @@ session_manager::SessionManager* BrowserProcessPlatformPart::SessionManager() {
return session_manager_.get();
}
+void BrowserProcessPlatformPart::RegisterKeepAlive() {
+ DCHECK(!keep_alive_);
+ keep_alive_.reset(
+ new ScopedKeepAlive(KeepAliveOrigin::BROWSER_PROCESS_CHROMEOS,
+ KeepAliveRestartOption::DISABLED));
+}
+
+void BrowserProcessPlatformPart::UnregisterKeepAlive() {
+ keep_alive_.reset();
+}
+
chromeos::ProfileHelper* BrowserProcessPlatformPart::profile_helper() {
DCHECK(CalledOnValidThread());
if (!created_profile_helper_)
« no previous file with comments | « chrome/browser/browser_process_platform_part_chromeos.h ('k') | chrome/browser/chromeos/login/login_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698