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

Issue 1778873002: Replace Increment/DecrementKeepAliveCount by ScopedKeepAlives (Closed)

Created:
4 years, 9 months ago by dgn
Modified:
4 years, 9 months ago
Reviewers:
sky
CC:
chromium-reviews, tapted, jennb, sadrul, Matt Giuca, tfarina, jianli, dzhioev+watch_chromium.org, achuith+watch_chromium.org, Dmitry Titov, dcheng, pfeldman, oshima+watch_chromium.org, devtools-reviews_chromium.org, kalyank, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@KAObserver
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace Increment/DecrementKeepAliveCount by ScopedKeepAlives It allows to remove those methods from application_lifetime.h and makes the KeepAliveRegistry move from KeepAlive increments to ModuleRef increments to keep the browser alive. BUG=587926 Committed: https://crrev.com/023777892ab897fc228dc74d5d2d16786c49d3fb Cr-Commit-Position: refs/heads/master@{#380812}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Cleanup #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 10

Patch Set 6 : Address comments #

Patch Set 7 : Rebased and addressed comments #

Patch Set 8 : remove registry destructor dchecks #

Total comments: 2

Patch Set 9 : replace the commented dcheck by a dlog #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -139 lines) Patch
M chrome/browser/app_controller_mac.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/app_controller_mac.mm View 1 2 3 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/apps/app_window_interactive_uitest.cc View 4 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/background/background_mode_manager.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/background/background_mode_manager_unittest.cc View 1 14 chunks +27 lines, -28 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/browser_process_platform_part_chromeos.h View 1 2 3 4 5 6 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/browser_process_platform_part_chromeos.cc View 1 2 3 4 5 6 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/login_browsertest.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/ui/login_display_host_impl.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/ui/login_display_host_impl.cc View 1 2 3 4 5 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/devtools/devtools_sanity_browsertest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/lifetime/application_lifetime.h View 6 1 chunk +5 lines, -17 lines 0 comments Download
M chrome/browser/lifetime/application_lifetime.cc View 1 6 chunks +5 lines, -35 lines 0 comments Download
M chrome/browser/lifetime/application_lifetime_aura.cc View 6 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/lifetime/browser_close_manager_browsertest.cc View 1 2 3 4 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_registry.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_registry.cc View 1 2 3 4 5 6 7 8 4 chunks +14 lines, -7 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_registry_unittest.cc View 1 2 3 4 5 3 chunks +13 lines, -8 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_types.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_types.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/sessions/better_session_restore_browsertest.cc View 1 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_views_browsertest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/ash_init.cc View 6 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/browser.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/panels/panel.h View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/panel.cc View 1 2 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc View 1 5 chunks +6 lines, -9 lines 0 comments Download
M chrome/test/base/testing_browser_process.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (3 generated)
dgn
PTAL https://codereview.chromium.org/1778873002/diff/1/chrome/browser/background/background_mode_manager_unittest.cc File chrome/browser/background/background_mode_manager_unittest.cc (left): https://codereview.chromium.org/1778873002/diff/1/chrome/browser/background/background_mode_manager_unittest.cc#oldcode249 chrome/browser/background/background_mode_manager_unittest.cc:249: chrome::IncrementKeepAliveCount(); This is not needed anymore because the ...
4 years, 9 months ago (2016-03-09 23:49:23 UTC) #2
sky
https://codereview.chromium.org/1778873002/diff/80001/chrome/browser/background/background_mode_manager_unittest.cc File chrome/browser/background/background_mode_manager_unittest.cc (left): https://codereview.chromium.org/1778873002/diff/80001/chrome/browser/background/background_mode_manager_unittest.cc#oldcode249 chrome/browser/background/background_mode_manager_unittest.cc:249: chrome::IncrementKeepAliveCount(); Why don't you need this anymore? https://codereview.chromium.org/1778873002/diff/80001/chrome/browser/devtools/devtools_sanity_browsertest.cc File ...
4 years, 9 months ago (2016-03-10 04:18:20 UTC) #3
dgn
PTAL https://codereview.chromium.org/1778873002/diff/80001/chrome/browser/background/background_mode_manager_unittest.cc File chrome/browser/background/background_mode_manager_unittest.cc (left): https://codereview.chromium.org/1778873002/diff/80001/chrome/browser/background/background_mode_manager_unittest.cc#oldcode249 chrome/browser/background/background_mode_manager_unittest.cc:249: chrome::IncrementKeepAliveCount(); On 2016/03/10 04:18:20, sky wrote: > Why ...
4 years, 9 months ago (2016-03-10 18:31:52 UTC) #4
sky
https://codereview.chromium.org/1778873002/diff/80001/chrome/browser/lifetime/application_lifetime_aura.cc File chrome/browser/lifetime/application_lifetime_aura.cc (right): https://codereview.chromium.org/1778873002/diff/80001/chrome/browser/lifetime/application_lifetime_aura.cc#newcode45 chrome/browser/lifetime/application_lifetime_aura.cc:45: g_browser_process->platform_part()->UnregisterKeepAlive(); On 2016/03/10 18:31:51, dgn wrote: > On 2016/03/10 ...
4 years, 9 months ago (2016-03-10 20:38:36 UTC) #5
dgn
PTAL https://codereview.chromium.org/1778873002/diff/80001/chrome/browser/lifetime/application_lifetime_aura.cc File chrome/browser/lifetime/application_lifetime_aura.cc (right): https://codereview.chromium.org/1778873002/diff/80001/chrome/browser/lifetime/application_lifetime_aura.cc#newcode45 chrome/browser/lifetime/application_lifetime_aura.cc:45: g_browser_process->platform_part()->UnregisterKeepAlive(); On 2016/03/10 20:38:36, sky wrote: > On ...
4 years, 9 months ago (2016-03-11 17:11:49 UTC) #6
dgn
I made the code stricter by enforcing that all keep alive should be cleared when ...
4 years, 9 months ago (2016-03-11 18:21:21 UTC) #7
dgn
PTAL. Tests don't wait for chrome to properly shutdown, meaning that the ones involving things ...
4 years, 9 months ago (2016-03-11 22:15:04 UTC) #8
sky
LGTM
4 years, 9 months ago (2016-03-11 23:15:10 UTC) #9
dgn
On 2016/03/11 23:15:10, sky wrote: > LGTM Thanks! Have a good week end!
4 years, 9 months ago (2016-03-11 23:24:15 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1778873002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1778873002/160001
4 years, 9 months ago (2016-03-11 23:24:23 UTC) #12
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 9 months ago (2016-03-12 00:58:48 UTC) #13
commit-bot: I haz the power
4 years, 9 months ago (2016-03-12 01:00:41 UTC) #15
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/023777892ab897fc228dc74d5d2d16786c49d3fb
Cr-Commit-Position: refs/heads/master@{#380812}

Powered by Google App Engine
This is Rietveld 408576698