Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_LIFETIME_KEEP_ALIVE_OPTIONS_H_ | 5 #ifndef CHROME_BROWSER_LIFETIME_KEEP_ALIVE_OPTIONS_H_ |
| 6 #define CHROME_BROWSER_LIFETIME_KEEP_ALIVE_OPTIONS_H_ | 6 #define CHROME_BROWSER_LIFETIME_KEEP_ALIVE_OPTIONS_H_ |
| 7 | 7 |
| 8 // Restart: Allow Chrome to restart when all the registered KeepAlives allow | |
| 9 // restarts | |
| 10 enum class KeepAliveOptionRestart { DISABLED, ENABLED }; | |
|
dgn
2016/02/23 16:58:46
Should I have an extra member like UNKNOWN that wo
| |
| 11 | |
| 8 struct KeepAliveOptions { | 12 struct KeepAliveOptions { |
| 9 // Should be descriptive of what the KeepAlive's lifetime is tied to, to help | 13 // Should be descriptive of what the KeepAlive's lifetime is tied to, to help |
| 10 // with debugging. | 14 // with debugging. |
| 11 const char* label; | 15 const char* label; |
| 12 | 16 |
| 17 const KeepAliveOptionRestart restart; | |
| 18 | |
| 13 // TODO(dgn) | 19 // TODO(dgn) |
| 14 // When registering a token, we should add indications of which kind of | 20 // When registering a token, we should add indications of which kind of |
| 15 // optimizations are allowed during the KeepAlive's lifetime. This will allow | 21 // optimizations are allowed during the KeepAlive's lifetime. This will allow |
| 16 // to have more info about the state of the browser to optimize the resource | 22 // to have more info about the state of the browser to optimize the resource |
| 17 // consumption. | 23 // consumption. |
| 18 }; | 24 }; |
| 19 | 25 |
| 20 #endif // CHROME_BROWSER_LIFETIME_KEEP_ALIVE_OPTIONS_H_ | 26 #endif // CHROME_BROWSER_LIFETIME_KEEP_ALIVE_OPTIONS_H_ |
| OLD | NEW |