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

Issue 1803143002: Replace BrowserProces::AddRefModule/RemoveModule by ScopedKeepAlive (Closed)

Created:
4 years, 9 months ago by dgn
Modified:
4 years, 9 months ago
Reviewers:
sky
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, tfarina, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace BrowserProces::AddRefModule/RemoveModule by ScopedKeepAlive Uses ScopedKeepAlive for Browser and menus, and remove references to other separate counters to keep Chrome alive. KeepAliveRegistry should now be the source of truth to look up what is keeping the browser process running. Doing so breaks many assumptions from the unit and browser tests, so most changes are to fix them. BUG=587926 Committed: https://crrev.com/fe075c81bffa961dfbc1bccc2e47501f45b88484 Cr-Commit-Position: refs/heads/master@{#381938}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : rebase #

Patch Set 5 : #

Total comments: 6

Patch Set 6 : Make BrowserProcess use KeepAliveStateObserver to start and stop #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 8

Patch Set 9 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -220 lines) Patch
M chrome/browser/apps/app_window_interactive_uitest.cc View 1 4 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/background/background_mode_manager_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/browser_process.h View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/browser_process_impl.h View 1 2 3 4 5 6 7 8 6 chunks +13 lines, -5 lines 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 8 chunks +67 lines, -55 lines 0 comments Download
M chrome/browser/extensions/api/content_settings/content_settings_apitest.cc View 1 4 chunks +12 lines, -14 lines 0 comments Download
M chrome/browser/extensions/api/preference/preference_apitest.cc View 1 4 chunks +11 lines, -12 lines 0 comments Download
M chrome/browser/lifetime/application_lifetime.h View 1 2 3 4 5 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/lifetime/application_lifetime.cc View 1 2 3 4 5 5 chunks +24 lines, -27 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_registry.h View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_registry.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -16 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_registry_unittest.cc View 1 2 3 4 5 6 7 8 5 chunks +26 lines, -17 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_state_observer.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_types.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/lifetime/keep_alive_types.cc View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/sessions/session_restore.cc View 4 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/sessions/session_restore_browsertest.cc View 7 chunks +11 lines, -7 lines 0 comments Download
M chrome/browser/ui/browser.h View 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser.cc View 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_list.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_browsertest.cc View 1 2 3 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_triggered_reset_browsertest_win.cc View 5 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/chrome_views_delegate.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/chrome_views_delegate.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/uninstall_view.cc View 1 2 chunks +8 lines, -6 lines 0 comments Download
M chrome/test/base/testing_browser_process.h View 1 2 3 4 5 2 chunks +0 lines, -5 lines 0 comments Download
M chrome/test/base/testing_browser_process.cc View 1 2 3 4 5 3 chunks +1 line, -10 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
dgn
PTAL. This should be the last CL for the KeepAlive unification. https://codereview.chromium.org/1803143002/diff/80001/chrome/browser/apps/app_window_interactive_uitest.cc File chrome/browser/apps/app_window_interactive_uitest.cc (left): ...
4 years, 9 months ago (2016-03-16 15:10:50 UTC) #2
sky
https://codereview.chromium.org/1803143002/diff/80001/chrome/browser/browser_process.h File chrome/browser/browser_process.h (right): https://codereview.chromium.org/1803143002/diff/80001/chrome/browser/browser_process.h#newcode190 chrome/browser/browser_process.h:190: virtual void Pin() = 0; I don't like having ...
4 years, 9 months ago (2016-03-16 16:04:32 UTC) #3
dgn
PTAL https://codereview.chromium.org/1803143002/diff/80001/chrome/browser/browser_process.h File chrome/browser/browser_process.h (right): https://codereview.chromium.org/1803143002/diff/80001/chrome/browser/browser_process.h#newcode190 chrome/browser/browser_process.h:190: virtual void Pin() = 0; On 2016/03/16 16:04:32, ...
4 years, 9 months ago (2016-03-16 22:28:36 UTC) #4
sky
I like using the observer! https://codereview.chromium.org/1803143002/diff/80001/chrome/browser/lifetime/keep_alive_registry.h File chrome/browser/lifetime/keep_alive_registry.h (right): https://codereview.chromium.org/1803143002/diff/80001/chrome/browser/lifetime/keep_alive_registry.h#newcode25 chrome/browser/lifetime/keep_alive_registry.h:25: bool IsOriginRegistered(KeepAliveOrigin origin) const; ...
4 years, 9 months ago (2016-03-17 00:02:24 UTC) #5
dgn
PTAL https://codereview.chromium.org/1803143002/diff/140001/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/1803143002/diff/140001/chrome/browser/browser_process_impl.cc#newcode981 chrome/browser/browser_process_impl.cc:981: void BrowserProcessImpl::OnKeepingAliveStateChanged(bool is_keeping_alive) { On 2016/03/17 00:02:24, sky ...
4 years, 9 months ago (2016-03-17 10:00:09 UTC) #6
sky
LGTM
4 years, 9 months ago (2016-03-17 21:01:00 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1803143002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1803143002/160001
4 years, 9 months ago (2016-03-18 09:57:27 UTC) #9
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 9 months ago (2016-03-18 11:25:44 UTC) #10
commit-bot: I haz the power
4 years, 9 months ago (2016-03-18 11:26:52 UTC) #12
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/fe075c81bffa961dfbc1bccc2e47501f45b88484
Cr-Commit-Position: refs/heads/master@{#381938}

Powered by Google App Engine
This is Rietveld 408576698