OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/app_list/keep_alive_service_impl.h" |
| 6 |
| 7 #include "chrome/browser/lifetime/application_lifetime.h" |
| 8 |
| 9 ScopedKeepAlive::ScopedKeepAlive() { |
| 10 chrome::StartKeepAlive(); |
| 11 } |
| 12 |
| 13 ScopedKeepAlive::~ScopedKeepAlive() { |
| 14 chrome::EndKeepAlive(); |
| 15 } |
| 16 |
| 17 KeepAliveServiceImpl::KeepAliveServiceImpl() { |
| 18 } |
| 19 |
| 20 KeepAliveServiceImpl::~KeepAliveServiceImpl() { |
| 21 } |
| 22 |
| 23 void KeepAliveServiceImpl::EnsureKeepAlive() { |
| 24 if (!keep_alive_) |
| 25 keep_alive_.reset(new ScopedKeepAlive()); |
| 26 } |
| 27 |
| 28 void KeepAliveServiceImpl::FreeKeepAlive() { |
| 29 if (keep_alive_) |
| 30 keep_alive_.reset(); |
| 31 } |
OLD | NEW |