Chromium Code Reviews| Index: chrome/browser/background/background_mode_manager.cc |
| diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc |
| index b219e831d9b66ce6977c0c6b73964aaf6214bbe7..45a89f2b8d30bd0cce08db671c3f1cbe5d0df35f 100644 |
| --- a/chrome/browser/background/background_mode_manager.cc |
| +++ b/chrome/browser/background/background_mode_manager.cc |
| @@ -311,7 +311,8 @@ BackgroundModeManager::BackgroundModeManager( |
| // there are background apps) or exit if there are none. |
| if (command_line.HasSwitch(switches::kNoStartupWindow)) { |
| keep_alive_for_startup_.reset( |
| - new ScopedKeepAlive(keep_alive::Origin::BACKGROUND_MODE_MANAGER)); |
| + new ScopedKeepAlive(keep_alive::Origin::BACKGROUND_MODE_MANAGER_STARTUP, |
|
Bernhard Bauer
2016/02/24 16:54:33
Are we ever going to use the same origin with diff
dgn
2016/02/24 19:08:32
Up to callers to decide what to do with their orig
|
| + keep_alive::RestartOption::DISABLED)); |
| } else { |
| // Otherwise, start with background mode suspended in case we're launching |
| // in a mode that doesn't open a browser window. It will be resumed when the |
| @@ -765,10 +766,10 @@ void BackgroundModeManager::ResumeBackgroundMode() { |
| void BackgroundModeManager::UpdateKeepAliveAndTrayIcon() { |
| if (in_background_mode_ && !background_mode_suspended_) { |
| - if (!keep_alive_) { |
| + if (!keep_alive_) |
|
Bernhard Bauer
2016/02/24 16:54:33
Keep the braces, as the body is more than one line
|
| keep_alive_.reset( |
| - new ScopedKeepAlive(keep_alive::Origin::BACKGROUND_MODE_MANAGER)); |
| - } |
| + new ScopedKeepAlive(keep_alive::Origin::BACKGROUND_MODE_MANAGER, |
| + keep_alive::RestartOption::ENABLED)); |
| CreateStatusTrayIcon(); |
| return; |
| } |