Index: chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
index f3d283e9076129a5e4c7e65951365ef35b6a9793..7568662754a778499ed99eb9b58f8d4fe57ae660 100644 |
--- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
+++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
@@ -55,6 +55,7 @@ |
#include "chrome/browser/chromeos/system/timezone_util.h" |
#include "chrome/browser/chromeos/ui/focus_ring_controller.h" |
#include "chrome/browser/lifetime/application_lifetime.h" |
+#include "chrome/browser/lifetime/browser_keep_alive.h" |
#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
#include "chrome/common/chrome_constants.h" |
@@ -307,7 +308,7 @@ LoginDisplayHostImpl::LoginDisplayHostImpl(const gfx::Rect& background_bounds) |
default_host_ = this; |
// Make sure chrome won't exit while we are at login/oobe screen. |
- chrome::IncrementKeepAliveCount(); |
+ keep_alive_.reset(new browser_lifetime::ScopedKeepAlive); |
bool is_registered = StartupUtils::IsDeviceRegistered(); |
bool zero_delay_enabled = WizardController::IsZeroDelayEnabled(); |
@@ -397,7 +398,7 @@ LoginDisplayHostImpl::~LoginDisplayHostImpl() { |
ResetLoginWindowAndView(); |
// Let chrome process exit after login/oobe screen if needed. |
- chrome::DecrementKeepAliveCount(); |
+ keep_alive_.reset(); |
sky
2015/10/07 17:27:24
As this is the destructor you shouldn't need the e
|
default_host_ = NULL; |
// TODO(tengs): This should be refactored. See crbug.com/314934. |