OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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/lifetime/scoped_keep_alive.h" |
| 6 |
| 7 #include "chrome/browser/lifetime/keep_alive_options.h" |
| 8 #include "chrome/browser/lifetime/keep_alive_registry.h" |
| 9 |
| 10 ScopedKeepAlive::ScopedKeepAlive(const KeepAliveOptions* options) |
| 11 : options_(options) { |
| 12 KeepAliveRegistry::GetInstance()->Register(options_); |
| 13 } |
| 14 |
| 15 ScopedKeepAlive::~ScopedKeepAlive() { |
| 16 KeepAliveRegistry::GetInstance()->Unregister(options_); |
| 17 } |
OLD | NEW |