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

Issue 2924723002: Network service: SafeBrowsing check for frame-resources from browser. (Closed)

Created:
3 years, 6 months ago by yzshen1
Modified:
3 years, 6 months ago
CC:
chromium-reviews, vakh+watch_chromium.org, viettrungluu+watch_chromium.org, grt+watch_chromium.org, Randy Smith (Not in Mondays), timvolodine, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, yzshen+watch_chromium.org, loading-reviews_chromium.org, darin (slow to review), mmenke, qsr+mojo_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Network service: SafeBrowsing check for frame-resources from browser. This CL: - adds safe_browsing::BrowserURLLoaderThrottle (which is a URLLoaderThrottle subclass) to throttle browser-side URL loading. - adds ContentBrowserClient::CreateURLLoaderThrottles() and implements it in ChromeContentBrowserClient to return a safe_browsing::BrowserURLLoaderThrottle instance. - changes NavigationURLLoaderNetworkService to use ThrottlingURLLoader on the IO thread. It no longer owns URLLoaderPtr or Binding<URLLoaderClient> on the UI thread. That means I had to proxy calls of these two interfaces between the IO and UI thread. But that is necessary because ThrottlingURLLoader needs to apply throttles living on the IO thread. - changes ThrottlingURLLoader to also support StartLoaderCallback, which we use in place of URLLoaderFactory in the browser. - uses PossiblyAssociatedInterfacePtr<URLLoader> and gets rid of AssociatedURLLoaderWrapper. It is less code and more efficient. (Eventually we will use non-associated URLLoaderPtr consistently.) BUG=715673 Review-Url: https://codereview.chromium.org/2924723002 Cr-Commit-Position: refs/heads/master@{#480212} Committed: https://chromium.googlesource.com/chromium/src/+/efcb7c795d6d84d1ab17e17d51efef624d79ce81

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 2

Patch Set 5 : . #

Patch Set 6 : . #

Total comments: 8

Patch Set 7 : sync & resolve #

Patch Set 8 : . #

Patch Set 9 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+780 lines, -632 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 4 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 5 chunks +23 lines, -5 lines 0 comments Download
A chrome/browser/safe_browsing/browser_url_loader_throttle.h View 1 2 3 4 5 6 7 1 chunk +68 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/browser_url_loader_throttle.cc View 1 2 3 4 5 6 7 1 chunk +87 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/mojo_safe_browsing_impl.cc View 1 2 3 4 5 6 7 8 4 chunks +20 lines, -222 lines 0 comments Download
A chrome/browser/safe_browsing/safe_browsing_url_checker_impl.h View 1 2 3 4 5 6 1 chunk +116 lines, -0 lines 0 comments Download
A chrome/browser/safe_browsing/safe_browsing_url_checker_impl.cc View 1 2 3 4 5 6 7 1 chunk +188 lines, -0 lines 0 comments Download
M chrome/renderer/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
A + chrome/renderer/safe_browsing/renderer_url_loader_throttle.h View 1 2 3 4 5 6 7 2 chunks +12 lines, -18 lines 0 comments Download
A + chrome/renderer/safe_browsing/renderer_url_loader_throttle.cc View 1 2 3 4 5 6 7 6 chunks +12 lines, -13 lines 0 comments Download
D chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.h View 1 2 3 4 5 6 1 chunk +0 lines, -60 lines 0 comments Download
D chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.cc View 1 2 3 4 5 6 1 chunk +0 lines, -104 lines 0 comments Download
M content/browser/loader/navigation_url_loader_network_service.h View 1 2 3 chunks +8 lines, -20 lines 0 comments Download
M content/browser/loader/navigation_url_loader_network_service.cc View 1 2 3 4 5 14 chunks +99 lines, -92 lines 0 comments Download
M content/child/resource_dispatcher.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A + content/common/possibly_associated_interface_ptr.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M content/common/throttling_url_loader.h View 1 2 3 4 5 5 chunks +40 lines, -5 lines 0 comments Download
M content/common/throttling_url_loader.cc View 1 2 3 4 5 5 chunks +65 lines, -22 lines 0 comments Download
M content/common/throttling_url_loader_unittest.cc View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M content/public/browser/content_browser_client.cc View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M content/renderer/BUILD.gn View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
D content/renderer/possibly_associated_interface_ptr.h View 1 1 chunk +0 lines, -57 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.h View 1 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (23 generated)
yzshen1
Hi, reviewers. Would you please take a look? Thanks!
3 years, 6 months ago (2017-06-10 00:43:54 UTC) #9
yzshen1
Hi, reviewers. Would you please take a look? Thanks!
3 years, 6 months ago (2017-06-10 00:43:55 UTC) #10
kinuko
lgtm https://codereview.chromium.org/2924723002/diff/60001/content/browser/loader/navigation_url_loader_network_service.cc File content/browser/loader/navigation_url_loader_network_service.cc (right): https://codereview.chromium.org/2924723002/diff/60001/content/browser/loader/navigation_url_loader_network_service.cc#newcode256 content/browser/loader/navigation_url_loader_network_service.cc:256: base::WeakPtr<NavigationURLLoaderNetworkService> owner_; Please comment that this is referenced ...
3 years, 6 months ago (2017-06-12 12:39:19 UTC) #13
jam
lgtm in the future when we only have network service code path, we can move ...
3 years, 6 months ago (2017-06-12 15:49:45 UTC) #14
jam
also, are there now SB browser_tests that pass? If so, can we run them on ...
3 years, 6 months ago (2017-06-12 16:00:39 UTC) #15
yzshen1
Thanks John and Kinuko. > in the future when we only have network service code ...
3 years, 6 months ago (2017-06-12 20:12:31 UTC) #20
yzshen1
On 2017/06/12 16:00:39, jam wrote: > also, are there now SB browser_tests that pass? If ...
3 years, 6 months ago (2017-06-12 20:12:57 UTC) #21
vakh (use Gerrit instead)
lgtm Just to confirm my understanding: There is no call flow between the following classes: ...
3 years, 6 months ago (2017-06-15 21:52:59 UTC) #26
yzshen1
Thanks Varun! > Just to confirm my understanding: > There is no call flow between ...
3 years, 6 months ago (2017-06-16 21:27:09 UTC) #28
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/2924723002/160001
3 years, 6 months ago (2017-06-16 21:31:29 UTC) #31
commit-bot: I haz the power
3 years, 6 months ago (2017-06-16 23:12:47 UTC) #34
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/efcb7c795d6d84d1ab17e17d51ef...

Powered by Google App Engine
This is Rietveld 408576698