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

Issue 550973002: Supervised user interstitial: Don't destroy WebContents that might still be in use (Closed)

Created:
6 years, 3 months ago by Marc Treib
Modified:
6 years, 3 months ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, pam+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Supervised user interstitial: Don't destroy WebContents that might still be in use. Before, the WebContents was closed directly from OnDontProceed. This breaks if the caller expects the WebContents to survive (happened e.g. when a new interstitial was being initialized). This CL instead posts a task to the message loop. Also, the tab won't be closed anymore if it's the last one in the window, as that would lead to closing the window. BUG=411841 Committed: https://crrev.com/e7ccb7eb32d74ae96f8f6ee7b038a02c4cffe491 Cr-Commit-Position: refs/heads/master@{#293985}

Patch Set 1 #

Patch Set 2 : fix #

Total comments: 11

Patch Set 3 : WebContentsUserData #

Total comments: 8

Patch Set 4 : only close on "go back" #

Total comments: 2

Patch Set 5 : review comments #

Patch Set 6 : call directly on "back" #

Patch Set 7 : fix test #

Patch Set 8 : fix Android build #

Total comments: 3

Patch Set 9 : review comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -9 lines) Patch
M chrome/browser/supervised_user/supervised_user_browsertest.cc View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/supervised_user/supervised_user_interstitial.cc View 1 2 3 4 5 6 7 8 7 chunks +54 lines, -8 lines 0 comments Download

Messages

Total messages: 30 (6 generated)
Marc Treib
That was way harder than it should have been... PTAL!
6 years, 3 months ago (2014-09-08 14:30:05 UTC) #2
Bernhard Bauer
Please use a more descriptive CL titld than "Fix a crash". What are you actually ...
6 years, 3 months ago (2014-09-08 16:29:46 UTC) #3
Marc Treib
https://codereview.chromium.org/550973002/diff/20001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/20001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode72 chrome/browser/supervised_user/supervised_user_interstitial.cc:72: delete this; On 2014/09/08 16:29:46, Bernhard Bauer wrote: > ...
6 years, 3 months ago (2014-09-09 09:17:09 UTC) #4
Marc Treib
https://codereview.chromium.org/550973002/diff/20001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/20001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode72 chrome/browser/supervised_user/supervised_user_interstitial.cc:72: delete this; On 2014/09/09 09:17:09, Marc Treib wrote: > ...
6 years, 3 months ago (2014-09-09 09:30:47 UTC) #5
Bernhard Bauer
https://codereview.chromium.org/550973002/diff/20001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/20001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode72 chrome/browser/supervised_user/supervised_user_interstitial.cc:72: delete this; On 2014/09/09 09:30:47, Marc Treib wrote: > ...
6 years, 3 months ago (2014-09-09 09:41:55 UTC) #6
Marc Treib
https://codereview.chromium.org/550973002/diff/20001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/20001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode72 chrome/browser/supervised_user/supervised_user_interstitial.cc:72: delete this; On 2014/09/09 09:41:55, Bernhard Bauer wrote: > ...
6 years, 3 months ago (2014-09-09 09:44:05 UTC) #7
Bernhard Bauer
Whoops, forgot to publish comments :) https://codereview.chromium.org/550973002/diff/20001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/20001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode72 chrome/browser/supervised_user/supervised_user_interstitial.cc:72: delete this; On ...
6 years, 3 months ago (2014-09-09 10:50:27 UTC) #8
Marc Treib
WebContentsUserData done. The "only close the tab if the 'back' button was pressed" part still ...
6 years, 3 months ago (2014-09-09 11:14:37 UTC) #9
Bernhard Bauer
https://codereview.chromium.org/550973002/diff/40001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/40001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode60 chrome/browser/supervised_user/supervised_user_interstitial.cc:60: friend class content::WebContentsUserData<TabCloser>; Add a blank line afterwards? https://codereview.chromium.org/550973002/diff/40001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode74 ...
6 years, 3 months ago (2014-09-09 11:26:07 UTC) #10
Marc Treib
..aand here's the "only close when the user pressed back" part :)
6 years, 3 months ago (2014-09-09 11:26:21 UTC) #11
Bernhard Bauer
https://codereview.chromium.org/550973002/diff/60001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/60001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode304 chrome/browser/supervised_user/supervised_user_interstitial.cc:304: if (back_button_pressed_ && !continue_request && nav_entry_count == 0) Just ...
6 years, 3 months ago (2014-09-09 11:32:31 UTC) #12
Marc Treib
https://codereview.chromium.org/550973002/diff/40001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/40001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode60 chrome/browser/supervised_user/supervised_user_interstitial.cc:60: friend class content::WebContentsUserData<TabCloser>; On 2014/09/09 11:26:06, Bernhard Bauer wrote: ...
6 years, 3 months ago (2014-09-09 11:51:25 UTC) #13
Bernhard Bauer
lgtm
6 years, 3 months ago (2014-09-09 12:10:47 UTC) #14
Marc Treib
On 2014/09/09 12:10:47, Bernhard Bauer wrote: > lgtm Thanks for the comments!
6 years, 3 months ago (2014-09-09 12:12:35 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/treib@chromium.org/550973002/100001
6 years, 3 months ago (2014-09-09 12:13:17 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/6773)
6 years, 3 months ago (2014-09-09 12:42:05 UTC) #19
Bernhard Bauer
https://codereview.chromium.org/550973002/diff/140001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/140001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode82 chrome/browser/supervised_user/supervised_user_interstitial.cc:82: tab_strip->CloseWebContentsAt( Do we actually need to do it this ...
6 years, 3 months ago (2014-09-09 14:12:21 UTC) #20
Marc Treib
https://codereview.chromium.org/550973002/diff/140001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/140001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode82 chrome/browser/supervised_user/supervised_user_interstitial.cc:82: tab_strip->CloseWebContentsAt( On 2014/09/09 14:12:20, Bernhard Bauer wrote: > Do ...
6 years, 3 months ago (2014-09-09 14:28:10 UTC) #21
Bernhard Bauer
https://codereview.chromium.org/550973002/diff/140001/chrome/browser/supervised_user/supervised_user_interstitial.cc File chrome/browser/supervised_user/supervised_user_interstitial.cc (right): https://codereview.chromium.org/550973002/diff/140001/chrome/browser/supervised_user/supervised_user_interstitial.cc#newcode82 chrome/browser/supervised_user/supervised_user_interstitial.cc:82: tab_strip->CloseWebContentsAt( On 2014/09/09 14:28:10, Marc Treib wrote: > On ...
6 years, 3 months ago (2014-09-09 14:31:51 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/treib@chromium.org/550973002/160001
6 years, 3 months ago (2014-09-09 14:34:23 UTC) #24
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
6 years, 3 months ago (2014-09-09 16:54:29 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/treib@chromium.org/550973002/160001
6 years, 3 months ago (2014-09-09 18:52:15 UTC) #28
commit-bot: I haz the power
Committed patchset #9 (id:160001) as 53647b63c8fd10a316a568edad18a2f0d33e1688
6 years, 3 months ago (2014-09-09 19:22:47 UTC) #29
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:54:53 UTC) #30
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/e7ccb7eb32d74ae96f8f6ee7b038a02c4cffe491
Cr-Commit-Position: refs/heads/master@{#293985}

Powered by Google App Engine
This is Rietveld 408576698