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_) |