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

Issue 836963003: Add the result of the inclusion whitelist to the OffDomainInclusionDetector's analysis. (Closed)

Created:
5 years, 11 months ago by gab
Modified:
5 years, 11 months ago
Reviewers:
grt (UTC plus 2), jwd, mattm
CC:
chromium-reviews, grt+watch_chromium.org, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@#c1_sbDB_ODIsupport
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add the result of the inclusion whitelist to the OffDomainInclusionDetector's analysis. BUG=412468 Committed: https://crrev.com/fab341f7b6f9c7bbc739c34554c666921de87833 Cr-Commit-Position: refs/heads/master@{#310989}

Patch Set 1 #

Total comments: 22

Patch Set 2 : review:grt #

Patch Set 3 : oops, compile fix #

Patch Set 4 : fix test leak #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -65 lines) Patch
M chrome/browser/safe_browsing/database_manager.h View 1 2 chunks +19 lines, -14 lines 0 comments Download
M chrome/browser/safe_browsing/database_manager.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h View 1 4 chunks +11 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.cc View 1 6 chunks +33 lines, -9 lines 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc View 1 2 3 16 chunks +104 lines, -38 lines 2 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (6 generated)
gab
Welcome back and happy new year Greg! PTAL as I'm trying to alleviate Matt's review ...
5 years, 11 months ago (2015-01-06 14:28:45 UTC) #2
gab
On 2015/01/06 14:28:45, gab wrote: > Welcome back and happy new year Greg! > > ...
5 years, 11 months ago (2015-01-06 14:32:46 UTC) #3
grt (UTC plus 2)
https://codereview.chromium.org/836963003/diff/1/chrome/browser/safe_browsing/database_manager.h File chrome/browser/safe_browsing/database_manager.h (right): https://codereview.chromium.org/836963003/diff/1/chrome/browser/safe_browsing/database_manager.h#newcode178 chrome/browser/safe_browsing/database_manager.h:178: // error occurs. This method is expected to be ...
5 years, 11 months ago (2015-01-07 14:35:49 UTC) #4
gab
Thanks, done. https://codereview.chromium.org/836963003/diff/1/chrome/browser/safe_browsing/database_manager.h File chrome/browser/safe_browsing/database_manager.h (right): https://codereview.chromium.org/836963003/diff/1/chrome/browser/safe_browsing/database_manager.h#newcode178 chrome/browser/safe_browsing/database_manager.h:178: // error occurs. This method is expected ...
5 years, 11 months ago (2015-01-07 17:52:01 UTC) #5
grt (UTC plus 2)
lgtm
5 years, 11 months ago (2015-01-07 18:37:04 UTC) #6
gab
Thanks, @Matt for safebrowsing rubberstamp (once you've had a chance to take a look at ...
5 years, 11 months ago (2015-01-07 20:18:56 UTC) #8
jwd
lgtm
5 years, 11 months ago (2015-01-08 16:26:25 UTC) #9
mattm
lgtm
5 years, 11 months ago (2015-01-08 23:14:17 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/836963003/40001
5 years, 11 months ago (2015-01-10 10:19:48 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel/builds/24263)
5 years, 11 months ago (2015-01-10 11:52:09 UTC) #14
gab
Fixed a leak in the test, take a look at latest patch set, landing now ...
5 years, 11 months ago (2015-01-10 17:16:53 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/836963003/80001
5 years, 11 months ago (2015-01-10 17:17:19 UTC) #18
commit-bot: I haz the power
Committed patchset #4 (id:80001)
5 years, 11 months ago (2015-01-10 19:08:45 UTC) #19
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/fab341f7b6f9c7bbc739c34554c666921de87833 Cr-Commit-Position: refs/heads/master@{#310989}
5 years, 11 months ago (2015-01-10 19:09:37 UTC) #20
mattm
https://codereview.chromium.org/836963003/diff/80001/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc File chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc (right): https://codereview.chromium.org/836963003/diff/80001/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc#newcode114 chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc:114: base::RunLoop().RunUntilIdle(); Is it actually asynchronous? SafeBrowsingService is DeleteOnUIThread, but ...
5 years, 11 months ago (2015-01-13 00:22:50 UTC) #21
gab
5 years, 11 months ago (2015-01-13 18:45:08 UTC) #22
Message was sent while issue was closed.
https://codereview.chromium.org/836963003/diff/80001/chrome/browser/safe_brow...
File
chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc
(right):

https://codereview.chromium.org/836963003/diff/80001/chrome/browser/safe_brow...
chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector_unittest.cc:114:
base::RunLoop().RunUntilIdle();
On 2015/01/13 00:22:50, mattm wrote:
> Is it actually asynchronous? SafeBrowsingService is DeleteOnUIThread, but this
> should be on the UI thread already so I thought it would be synchronously
> deleted once you reset the off_domain_inclusion_detector_. Or is there some
> other thing holding a ref too?

Oh right, hadn't noticed that DeleteOnThread was smart enough not to post an
async task if it was already on the right thread, see [1] below, (which it
always is in unit_tests).

This thus makes it weird that ASAN would be tripped (I just tried locally and
confirmed that deleting OffDomainInclusionDetector synchronously ends up
deleting the SafeBrowsingService).

FWIW, I took this paradigm from
https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/saf...

I'm now trying 2 different patch sets @
https://codereview.chromium.org/848063002 to see if a simpler version of this
still trips ASAN.

Perhaps the problem is that ASAN does its leak check between TearDown() and
~OffDomainInclusionDetectorTest(), but that would seem weird to me as then
everything owned by the test fixture would be reported as a leak...

Or perhaps CurrentlyOn(UI) @ [1] somehow returns false at some point passed
TearDown()... (though, from local testing, that appears to work...).

[1]
https://code.google.com/p/chromium/codesearch#chromium/src/content/public/bro...

I'll figure it out and come up with a fix, thanks for bringing it up.

Powered by Google App Engine
This is Rietveld 408576698