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

Issue 2336043007: Domain Reliability: Don't crash on shutdown with uploads pending (Closed)

Created:
4 years, 3 months ago by Julia Tuttle
Modified:
4 years ago
Reviewers:
Mike West, davidben, mmenke
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Domain Reliability: Don't crash on shutdown with uploads pending This fixes a couple of bugs: 1. Makes sure the ChromeNetworkDelegate can't call in to a destroyed DomainReliabilityMonitor by moving ownership of the Monitor from ProfileImplIOData to ChromeNetworkDelegate. 2. Makes sure the uploader doesn't leave URL requests around once they're all supposed to be gone by adding a separate "shutdown" step that deletes existing requests and prohibits new ones. BUG=644858 Committed: https://crrev.com/127604ea9f06489c24bf6ad47d5ea62b266d45b4 Cr-Commit-Position: refs/heads/master@{#439520}

Patch Set 1 #

Patch Set 2 : Actually fix. #

Patch Set 3 : Make DomainReliabilityMonitor owned by ChromeNetworkDelegate #

Patch Set 4 : Initialize new raw pointer. #

Total comments: 6

Patch Set 5 : Move to LazyParams #

Patch Set 6 : Shutdown uploader in unittest #

Total comments: 2

Patch Set 7 : rebase #

Patch Set 8 : Add uploader unittest. #

Patch Set 9 : Add browser test. #

Patch Set 10 : fix compile error #

Patch Set 11 : No, really. #

Total comments: 32

Patch Set 12 : Make requested changes. #

Patch Set 13 : Remove outdated comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+306 lines, -27 lines) Patch
M chrome/browser/browsing_data/browsing_data_remover_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +13 lines, -0 lines 0 comments Download
A chrome/browser/domain_reliability/browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +101 lines, -0 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.h View 1 2 3 4 5 6 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.h View 1 2 3 4 5 6 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +20 lines, -10 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M components/domain_reliability/dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -1 line 0 comments Download
M components/domain_reliability/dispatcher.cc View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
M components/domain_reliability/monitor.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -0 lines 0 comments Download
M components/domain_reliability/monitor.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -0 lines 0 comments Download
M components/domain_reliability/monitor_unittest.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M components/domain_reliability/service.h View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M components/domain_reliability/service.cc View 1 2 3 4 5 6 7 8 2 chunks +39 lines, -0 lines 0 comments Download
M components/domain_reliability/uploader.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M components/domain_reliability/uploader.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +21 lines, -8 lines 0 comments Download
M components/domain_reliability/uploader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 12 chunks +49 lines, -2 lines 0 comments Download

Messages

Total messages: 74 (50 generated)
Julia Tuttle
PTAL, davidben. I don't think there are any dependencies in the *other* direction (calls from ...
4 years, 3 months ago (2016-09-15 18:06:00 UTC) #6
davidben
Hrm. So the dependency goes Monitor -> Uploader -> URLRequest -> ChromeNetworkDelegate -> Monitor -> ...
4 years, 3 months ago (2016-09-16 18:55:14 UTC) #8
mmenke
On 2016/09/16 18:55:14, davidben wrote: > Hrm. So the dependency goes Monitor -> Uploader -> ...
4 years, 3 months ago (2016-09-16 19:38:25 UTC) #9
mmenke
On 2016/09/16 19:38:25, mmenke wrote: > On 2016/09/16 18:55:14, davidben wrote: > > Hrm. So ...
4 years, 3 months ago (2016-09-16 20:43:23 UTC) #10
Julia Tuttle
PTAL davidben, mmenke. I plan to add integration tests to prevent this kind of thing ...
4 years, 3 months ago (2016-09-22 17:07:15 UTC) #19
davidben
Sorry about the delay. It seems there was some confusion whether it was me or ...
4 years, 2 months ago (2016-09-26 21:14:48 UTC) #20
mmenke
https://codereview.chromium.org/2336043007/diff/60001/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (right): https://codereview.chromium.org/2336043007/diff/60001/chrome/browser/profiles/profile_impl_io_data.cc#newcode183 chrome/browser/profiles/profile_impl_io_data.cc:183: io_data_->domain_reliability_monitor_ = domain_reliability_monitor.release(); On 2016/09/26 21:14:48, davidben wrote: > ...
4 years, 2 months ago (2016-09-26 21:30:09 UTC) #21
Julia Tuttle
PTAL, mmenke.
4 years, 2 months ago (2016-09-27 16:20:16 UTC) #26
Julia Tuttle
https://codereview.chromium.org/2336043007/diff/60001/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (right): https://codereview.chromium.org/2336043007/diff/60001/chrome/browser/profiles/profile_impl_io_data.cc#newcode183 chrome/browser/profiles/profile_impl_io_data.cc:183: io_data_->domain_reliability_monitor_ = domain_reliability_monitor.release(); On 2016/09/26 21:14:48, davidben wrote: > ...
4 years, 2 months ago (2016-09-27 16:49:59 UTC) #27
mmenke
Quick comments, haven't reviewed changes. https://codereview.chromium.org/2336043007/diff/100001/components/domain_reliability/monitor.cc File components/domain_reliability/monitor.cc (right): https://codereview.chromium.org/2336043007/diff/100001/components/domain_reliability/monitor.cc#newcode159 components/domain_reliability/monitor.cc:159: uploader_->Shutdown(); On 2016/09/27 16:49:59, ...
4 years, 2 months ago (2016-09-27 16:56:16 UTC) #31
Julia Tuttle
PTAL, mmenke. I now have a unittest that makes sure Uploader won't create any more ...
4 years ago (2016-12-09 17:58:00 UTC) #38
mmenke
I'll look at this later today, but it seems like there really should be an ...
4 years ago (2016-12-09 18:07:06 UTC) #39
Julia Tuttle
On 2016/12/09 18:07:06, mmenke wrote: > I'll look at this later today, but it seems ...
4 years ago (2016-12-13 22:03:49 UTC) #43
mmenke
On 2016/12/13 22:03:49, Julia Tuttle wrote: > On 2016/12/09 18:07:06, mmenke wrote: > > I'll ...
4 years ago (2016-12-13 22:06:37 UTC) #45
mmenke
Sorry for the delay. Longer CLs in code that I know less well tend to ...
4 years ago (2016-12-14 19:12:16 UTC) #56
Julia Tuttle
PTAL, mmenke. https://codereview.chromium.org/2336043007/diff/200001/chrome/browser/browsing_data/browsing_data_remover_unittest.cc File chrome/browser/browsing_data/browsing_data_remover_unittest.cc (right): https://codereview.chromium.org/2336043007/diff/200001/chrome/browser/browsing_data/browsing_data_remover_unittest.cc#newcode889 chrome/browser/browsing_data/browsing_data_remover_unittest.cc:889: NOTREACHED(); On 2016/12/14 19:12:17, mmenke (Out Dec ...
4 years ago (2016-12-15 21:53:00 UTC) #59
mmenke
LGTM!
4 years ago (2016-12-15 22:16:24 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2336043007/240001
4 years ago (2016-12-15 22:18:06 UTC) #62
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/327254)
4 years ago (2016-12-15 22:43:23 UTC) #64
Julia Tuttle
mkwst, PTAL at browsing_data
4 years ago (2016-12-19 17:06:05 UTC) #66
Mike West
browsing_data LGTM!
4 years ago (2016-12-19 17:06:34 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2336043007/240001
4 years ago (2016-12-19 17:07:28 UTC) #69
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years ago (2016-12-19 19:13:38 UTC) #72
commit-bot: I haz the power
4 years ago (2016-12-19 19:15:29 UTC) #74
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/127604ea9f06489c24bf6ad47d5ea62b266d45b4
Cr-Commit-Position: refs/heads/master@{#439520}

Powered by Google App Engine
This is Rietveld 408576698