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

Issue 875273003: Hidden windows should not keep Chrome alive. (Closed)

Created:
5 years, 11 months ago by jackhou1
Modified:
5 years, 10 months ago
Reviewers:
benwells
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Hidden windows should not keep Chrome alive. For each app window, there is a ChromeAppDelegate which holds a ScopedKeepAlive. This CL resets the ScopedKeepAlive while the app window is hidden. BUG=450710 Committed: https://crrev.com/39d75d5b5f11525e384745fd313d1d77ed7d0a88 Cr-Commit-Position: refs/heads/master@{#316413}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments #

Patch Set 3 : If window is hidden without being shown, wait for timeout before releasing keep-alive. #

Total comments: 6

Patch Set 4 : Address comments. #

Patch Set 5 : Close app windows at end of tests to fix DCHECK in profile_destroyer.cc #

Patch Set 6 : Only run new tests on platforms that use keep-alive (Linux, Windows). #

Patch Set 7 : Fix asan issues. #

Patch Set 8 : Actually fix the ASAN issue. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -7 lines) Patch
M chrome/browser/apps/app_window_interactive_uitest.cc View 1 2 3 4 5 6 7 2 chunks +78 lines, -0 lines 0 comments Download
M chrome/browser/ui/apps/chrome_app_delegate.h View 1 2 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/apps/chrome_app_delegate.cc View 1 2 3 4 5 6 7 5 chunks +41 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/hidden/test.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/platform_apps/hidden_then_shown/empty.html View 1 2 3 4 5 6 7 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/hidden_then_shown/manifest.json View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/platform_apps/hidden_then_shown/test.js View 1 2 1 chunk +9 lines, -4 lines 0 comments Download
M extensions/browser/app_window/app_delegate.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/browser/app_window/app_window.cc View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M extensions/shell/browser/shell_app_delegate.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (4 generated)
jackhou1
benwells, what do you think of this? Are there any cases where a hidden window ...
5 years, 11 months ago (2015-01-27 23:50:12 UTC) #2
benwells
Can we have a test for this? https://codereview.chromium.org/875273003/diff/1/chrome/browser/ui/apps/chrome_app_delegate.cc File chrome/browser/ui/apps/chrome_app_delegate.cc (right): https://codereview.chromium.org/875273003/diff/1/chrome/browser/ui/apps/chrome_app_delegate.cc#newcode308 chrome/browser/ui/apps/chrome_app_delegate.cc:308: keep_alive_.reset(); If ...
5 years, 11 months ago (2015-01-28 02:42:10 UTC) #3
jackhou1
Added test. I realized with this change, an app that starts out hidden and shows ...
5 years, 10 months ago (2015-02-03 06:05:13 UTC) #4
benwells
On 2015/02/03 06:05:13, jackhou1 wrote: > Added test. > > I realized with this change, ...
5 years, 10 months ago (2015-02-03 06:48:38 UTC) #5
jackhou1
Okay, I think Patch Set 3 is a reasonably neat way to implement the timeout ...
5 years, 10 months ago (2015-02-09 04:52:11 UTC) #6
benwells
lgtm https://codereview.chromium.org/875273003/diff/40001/chrome/browser/apps/app_window_interactive_uitest.cc File chrome/browser/apps/app_window_interactive_uitest.cc (right): https://codereview.chromium.org/875273003/diff/40001/chrome/browser/apps/app_window_interactive_uitest.cc#newcode485 chrome/browser/apps/app_window_interactive_uitest.cc:485: // An window that is created hidden and ...
5 years, 10 months ago (2015-02-10 07:25:10 UTC) #7
jackhou1
PTAL Updated some tests to use chrome::WillKeepAlive. https://codereview.chromium.org/875273003/diff/40001/chrome/browser/apps/app_window_interactive_uitest.cc File chrome/browser/apps/app_window_interactive_uitest.cc (right): https://codereview.chromium.org/875273003/diff/40001/chrome/browser/apps/app_window_interactive_uitest.cc#newcode485 chrome/browser/apps/app_window_interactive_uitest.cc:485: // An ...
5 years, 10 months ago (2015-02-10 23:33:21 UTC) #9
benwells
On 2015/02/10 23:33:21, jackhou1 wrote: > PTAL > > Updated some tests to use chrome::WillKeepAlive. ...
5 years, 10 months ago (2015-02-11 04:37:10 UTC) #10
jackhou1
PTAL
5 years, 10 months ago (2015-02-11 22:34:16 UTC) #11
benwells
On 2015/02/11 22:34:16, jackhou1 wrote: > PTAL lgtm once the asan issue is fixed.
5 years, 10 months ago (2015-02-12 22:34:44 UTC) #12
benwells
(forgot this nit) https://codereview.chromium.org/875273003/diff/40001/chrome/browser/apps/app_window_interactive_uitest.cc File chrome/browser/apps/app_window_interactive_uitest.cc (right): https://codereview.chromium.org/875273003/diff/40001/chrome/browser/apps/app_window_interactive_uitest.cc#newcode485 chrome/browser/apps/app_window_interactive_uitest.cc:485: // An window that is created ...
5 years, 10 months ago (2015-02-12 22:55:08 UTC) #13
jackhou1
Okay, asan actually fixed now. https://codereview.chromium.org/875273003/diff/40001/chrome/browser/apps/app_window_interactive_uitest.cc File chrome/browser/apps/app_window_interactive_uitest.cc (right): https://codereview.chromium.org/875273003/diff/40001/chrome/browser/apps/app_window_interactive_uitest.cc#newcode485 chrome/browser/apps/app_window_interactive_uitest.cc:485: // An window that ...
5 years, 10 months ago (2015-02-15 23:00:27 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/875273003/140001
5 years, 10 months ago (2015-02-15 23:01:35 UTC) #17
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 10 months ago (2015-02-16 00:39:02 UTC) #18
commit-bot: I haz the power
5 years, 10 months ago (2015-02-16 00:40:14 UTC) #19
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/39d75d5b5f11525e384745fd313d1d77ed7d0a88
Cr-Commit-Position: refs/heads/master@{#316413}

Powered by Google App Engine
This is Rietveld 408576698