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

Issue 10824020: Move PROFILE_DESTROYED notification to ProfileDestroyer and observe it in ExtensionProcessManager. (Closed)

Created:
8 years, 5 months ago by Yoyo Zhou
Modified:
8 years, 5 months ago
Reviewers:
MAD, sky, rpetterson, Matt Perry
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org, willchan no longer on Chromium
Visibility:
Public.

Description

Move PROFILE_DESTROYED notification to ProfileDestroyer and observe it in ExtensionProcessManager. 1. EPM was not observing the correct notification to shut down its ExtensionHosts. 2. PROFILE_DESTROYED has to be sent early enough that the EPM can shut down ExtensionHosts before the ProfileDestroyer checks that all renderers are gone. BUG=138843 TEST=In Debug build, have a split mode incognito extension installed. Open and close an incognito window; no crash. Close the regular profile window; no crash. TBR=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=148674

Patch Set 1 #

Total comments: 3

Patch Set 2 : notify me maybe #

Patch Set 3 : destroy original profile->destroy incognito EPM #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -17 lines) Patch
M chrome/browser/extensions/extension_process_manager.cc View 1 2 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_impl.cc View 1 3 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile.h View 1 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 3 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_destroyer.cc View 1 3 chunks +5 lines, -1 line 3 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 1 chunk +1 line, -5 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Yoyo Zhou
mad, rlp: please review for profiles mpcomplete: please review for extensions willchan: FYI since you ...
8 years, 5 months ago (2012-07-25 18:13:00 UTC) #1
Matt Perry
lgtm http://codereview.chromium.org/10824020/diff/1/chrome/browser/profiles/profile_destroyer.cc File chrome/browser/profiles/profile_destroyer.cc (right): http://codereview.chromium.org/10824020/diff/1/chrome/browser/profiles/profile_destroyer.cc#newcode45 chrome/browser/profiles/profile_destroyer.cc:45: DCHECK(hosts.empty() || profile->IsOffTheRecord()); you should change the DCHECK ...
8 years, 5 months ago (2012-07-25 19:32:08 UTC) #2
rpetterson
Perhaps MAD can shed some light on this, but I don't think profile destroyer is ...
8 years, 5 months ago (2012-07-25 20:44:05 UTC) #3
willchan no longer on Chromium
I haven't read this CL yet, but ProfileManager does *not* actually destroy the profile anymore. ...
8 years, 5 months ago (2012-07-25 22:07:44 UTC) #4
Yoyo Zhou
On Wed, Jul 25, 2012 at 3:07 PM, William Chan (陈智昌) <willchan@chromium.org> wrote: > I ...
8 years, 5 months ago (2012-07-25 22:12:15 UTC) #5
willchan no longer on Chromium
The main weird profile destruction stuff we have in unit tests is in the ProfileManager ...
8 years, 5 months ago (2012-07-25 23:13:05 UTC) #6
Yoyo Zhou
On 2012/07/25 23:13:05, willchan wrote: > The main weird profile destruction stuff we have in ...
8 years, 5 months ago (2012-07-26 01:01:43 UTC) #7
rpetterson
Yes, that sounds reasonable. On 2012/07/26 01:01:43, Yoyo Zhou wrote: > On 2012/07/25 23:13:05, willchan ...
8 years, 5 months ago (2012-07-26 02:46:59 UTC) #8
Yoyo Zhou
I've added MaybeSendDestroyedNotification to Profile. Please take another look.
8 years, 5 months ago (2012-07-26 17:35:33 UTC) #9
rpetterson
LGTM
8 years, 5 months ago (2012-07-26 18:04:18 UTC) #10
Yoyo Zhou
I had to fix up the listeneing in the EPM so that the incognito one ...
8 years, 5 months ago (2012-07-26 23:32:29 UTC) #11
Yoyo Zhou
sky: can you review the trivial change to chrome/test?
8 years, 5 months ago (2012-07-27 00:17:00 UTC) #12
Yoyo Zhou
moving sky to TBR
8 years, 5 months ago (2012-07-27 00:36:14 UTC) #13
Matt Perry
lgtm http://codereview.chromium.org/10824020/diff/13003/chrome/browser/profiles/profile_destroyer.cc File chrome/browser/profiles/profile_destroyer.cc (right): http://codereview.chromium.org/10824020/diff/13003/chrome/browser/profiles/profile_destroyer.cc#newcode37 chrome/browser/profiles/profile_destroyer.cc:37: } What if we just moved this test ...
8 years, 5 months ago (2012-07-27 00:37:09 UTC) #14
Yoyo Zhou
http://codereview.chromium.org/10824020/diff/13003/chrome/browser/profiles/profile_destroyer.cc File chrome/browser/profiles/profile_destroyer.cc (right): http://codereview.chromium.org/10824020/diff/13003/chrome/browser/profiles/profile_destroyer.cc#newcode37 chrome/browser/profiles/profile_destroyer.cc:37: } On 2012/07/27 00:37:09, Matt Perry wrote: > What ...
8 years, 5 months ago (2012-07-27 00:45:13 UTC) #15
Matt Perry
8 years, 5 months ago (2012-07-27 00:51:24 UTC) #16
http://codereview.chromium.org/10824020/diff/13003/chrome/browser/profiles/pr...
File chrome/browser/profiles/profile_destroyer.cc (right):

http://codereview.chromium.org/10824020/diff/13003/chrome/browser/profiles/pr...
chrome/browser/profiles/profile_destroyer.cc:37: }
On 2012/07/27 00:45:13, Yoyo Zhou wrote:
> On 2012/07/27 00:37:09, Matt Perry wrote:
> > What if we just moved this test and the new notification to the Profile
> > destructor instead? Would that fix this bug?
> 
> Did you mean the test right below this line? (Oops, I forgot to change that
per
> your earlier comment.)
> 
> We'd then have to move/copy GetHostsForProfile into the Profile destructor...
> also, I think that might defeat the purpose of ProfileDestroyer, which I think
> is to not actually start destroying the profiles until their renderers are
gone.

Ah, nevermind then.

Powered by Google App Engine
This is Rietveld 408576698