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

Issue 1415773004: Refactor ownership model for FirstWebContentsProfiler. (Closed)

Created:
5 years, 2 months ago by gab
Modified:
5 years, 1 month ago
CC:
chromium-reviews, asvitkine+watch_chromium.org, rkaplow
Base URL:
https://chromium.googlesource.com/chromium/src.git@a1_more_abandons_and_umabandons
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor ownership model for FirstWebContentsProfiler. Previously ChromeBrowserMainExtraPartsMetrics was owning FirstWebContentsProfiler which would have a reference back to it as a Delegate only to be able to tell ChromeBrowserMainExtraPartsMetrics to destroy its FirstWebContentsProfiler self when done (i.e. FirstWebContentsProfiler was essentially managing its own lifetime but someone else was the explicit owner...). The only thing that could have made sense was if that guaranteed that the FirstWebContentsProfiler didn't somehow live beyond its observed WebContents and cause crashes on shutdown but this already can't be the case as it self-destructs on WebContentsObserver::WebContentsDestroyed(). BUG=Unecessarily complex ownership model. Committed: https://crrev.com/8335a8869b48e2c5837c12bca370bd44de058c3f Cr-Commit-Position: refs/heads/master@{#359953}

Patch Set 1 #

Patch Set 2 : update comment #

Patch Set 3 : explicit private destructor and rm more unused code #

Patch Set 4 : fix compile #

Total comments: 2

Patch Set 5 : merge up to r359553 #

Patch Set 6 : +lifetime comment on new #

Total comments: 2

Patch Set 7 : - // #

Patch Set 8 : rebase on leak fix (https://codereview.chromium.org/1449933002) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -59 lines) Patch
M chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h View 1 2 4 chunks +0 lines, -17 lines 0 comments Download
M chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc View 1 2 3 chunks +5 lines, -8 lines 0 comments Download
M chrome/browser/metrics/first_web_contents_profiler.h View 1 2 3 4 5 6 4 chunks +6 lines, -19 lines 0 comments Download
M chrome/browser/metrics/first_web_contents_profiler.cc View 1 2 3 4 5 6 7 2 chunks +12 lines, -15 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 48 (13 generated)
gab
Rob PTAL, thanks :-)!
5 years, 2 months ago (2015-10-20 19:55:59 UTC) #2
rkaplow
Looks like this suggestion came up in the original review: https://codereview.chromium.org/760763002/ Specifically: On 2014/11/26 02:24:55, ...
5 years, 2 months ago (2015-10-20 20:28:02 UTC) #3
rkaplow
On 2015/10/20 20:28:02, rkaplow wrote: > Looks like this suggestion came up in the original ...
5 years, 2 months ago (2015-10-20 20:28:34 UTC) #4
erikchen
On 2015/10/20 20:28:34, rkaplow wrote: > On 2015/10/20 20:28:02, rkaplow wrote: > > Looks like ...
5 years, 2 months ago (2015-10-20 20:56:09 UTC) #5
Ilya Sherman
On 2015/10/20 20:56:09, erikchen wrote: > On 2015/10/20 20:28:34, rkaplow wrote: > > On 2015/10/20 ...
5 years, 2 months ago (2015-10-20 22:14:04 UTC) #6
rkaplow
We'll keep the current implementation. Thanks for looking into it though gab.
5 years, 2 months ago (2015-10-21 14:29:06 UTC) #7
gab
I strongly disagree with the current implementation being better. The current model is essentially self-ownership ...
5 years, 2 months ago (2015-10-21 15:15:03 UTC) #8
gab
ping (see previous reply). In short, I believe no downside of self-ownership is avoided by ...
5 years, 2 months ago (2015-10-22 15:58:56 UTC) #9
gab
@Ilya: ping on previous messages. I appreciate your care to do a drive-by notlgtm for ...
5 years, 1 month ago (2015-10-27 15:01:25 UTC) #10
rkaplow
Ilya I'm going to defer to you for the final say on this one since ...
5 years, 1 month ago (2015-10-27 22:17:20 UTC) #12
erikchen
On 2015/10/27 22:17:20, rkaplow wrote: > Ilya I'm going to defer to you for the ...
5 years, 1 month ago (2015-10-28 18:39:47 UTC) #13
Ilya Sherman
On 2015/10/27 15:01:25, gab wrote: > @Ilya: ping on previous messages. I appreciate your care ...
5 years, 1 month ago (2015-10-28 19:11:34 UTC) #14
gab
I don't think the concerns for testing are justified here as the implicit owner is ...
5 years, 1 month ago (2015-10-28 19:29:03 UTC) #15
Ilya Sherman
On 2015/10/28 19:29:03, gab wrote: > I don't think the concerns for testing are justified ...
5 years, 1 month ago (2015-10-28 19:31:23 UTC) #16
gab
On 2015/10/28 19:31:23, Ilya Sherman wrote: > On 2015/10/28 19:29:03, gab wrote: > > I ...
5 years, 1 month ago (2015-10-28 19:41:10 UTC) #17
Ilya Sherman
On 2015/10/28 19:41:10, gab wrote: > On 2015/10/28 19:31:23, Ilya Sherman wrote: > > On ...
5 years, 1 month ago (2015-10-28 19:57:03 UTC) #18
gab
On 2015/10/28 19:57:03, Ilya Sherman wrote: > On 2015/10/28 19:41:10, gab wrote: > > On ...
5 years, 1 month ago (2015-11-09 20:43:51 UTC) #19
gab
On 2015/11/09 20:43:51, gab wrote: > On 2015/10/28 19:57:03, Ilya Sherman wrote: > > On ...
5 years, 1 month ago (2015-11-09 20:45:27 UTC) #20
Ilya Sherman
On 2015/11/09 20:45:27, gab wrote: > On 2015/11/09 20:43:51, gab wrote: > > On 2015/10/28 ...
5 years, 1 month ago (2015-11-09 22:51:47 UTC) #21
gab
On 2015/11/09 22:51:47, Ilya Sherman wrote: > On 2015/11/09 20:45:27, gab wrote: > > On ...
5 years, 1 month ago (2015-11-10 01:33:26 UTC) #22
Alexei Svitkine (slow)
I was asked to provide a second opinion here. Looking at the diff and the ...
5 years, 1 month ago (2015-11-13 17:29:00 UTC) #24
gab
Rebased on trunk and added requested comment. @Ilya: ok? Thanks, Gab https://codereview.chromium.org/1415773004/diff/60001/chrome/browser/metrics/first_web_contents_profiler.cc File chrome/browser/metrics/first_web_contents_profiler.cc (right): ...
5 years, 1 month ago (2015-11-13 19:22:21 UTC) #26
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/1415773004/diff/120001/chrome/browser/metrics/first_web_contents_profiler.h File chrome/browser/metrics/first_web_contents_profiler.h (right): https://codereview.chromium.org/1415773004/diff/120001/chrome/browser/metrics/first_web_contents_profiler.h#newcode63 chrome/browser/metrics/first_web_contents_profiler.h:63: // // Logs |finish_reason| to UMA and deletes ...
5 years, 1 month ago (2015-11-13 19:24:33 UTC) #27
gab
https://codereview.chromium.org/1415773004/diff/120001/chrome/browser/metrics/first_web_contents_profiler.h File chrome/browser/metrics/first_web_contents_profiler.h (right): https://codereview.chromium.org/1415773004/diff/120001/chrome/browser/metrics/first_web_contents_profiler.h#newcode63 chrome/browser/metrics/first_web_contents_profiler.h:63: // // Logs |finish_reason| to UMA and deletes this ...
5 years, 1 month ago (2015-11-13 19:29:05 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1415773004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1415773004/140001
5 years, 1 month ago (2015-11-13 19:30:37 UTC) #30
Ilya Sherman
On 2015/11/13 19:22:21, gab wrote: > Rebased on trunk and added requested comment. > > ...
5 years, 1 month ago (2015-11-13 20:13:34 UTC) #31
gab
On 2015/11/13 20:13:34, Ilya Sherman wrote: > On 2015/11/13 19:22:21, gab wrote: > > Rebased ...
5 years, 1 month ago (2015-11-13 20:57:07 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1415773004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1415773004/140001
5 years, 1 month ago (2015-11-13 20:58:20 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/78771)
5 years, 1 month ago (2015-11-13 21:43:44 UTC) #38
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1415773004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1415773004/160001
5 years, 1 month ago (2015-11-16 16:38:50 UTC) #40
gab
On 2015/11/13 21:43:44, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 1 month ago (2015-11-16 17:22:06 UTC) #41
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-16 17:26:04 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1415773004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1415773004/160001
5 years, 1 month ago (2015-11-16 23:34:22 UTC) #46
commit-bot: I haz the power
Committed patchset #8 (id:160001)
5 years, 1 month ago (2015-11-16 23:42:47 UTC) #47
commit-bot: I haz the power
5 years, 1 month ago (2015-11-16 23:43:47 UTC) #48
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/8335a8869b48e2c5837c12bca370bd44de058c3f
Cr-Commit-Position: refs/heads/master@{#359953}

Powered by Google App Engine
This is Rietveld 408576698