Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(849)

Side by Side Diff: chrome/browser/lifetime/keep_alive_options.h

Issue 1725883002: Add KeepAliveStateObserver, add the Restart option (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KeepAlive
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698