commit | af79ca9b527194092a6fa4dc3ac4bcf3174a6e1b | [log] [tgz] |
---|---|---|
author | Yao Xiao <yaoxia@chromium.org> | Tue Mar 12 19:54:18 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Mar 12 19:54:18 2019 |
tree | 142502124ed4842c203a9abe91c15cd8599648ce | |
parent | 576ef7c1e1e54865dc56ff196b8f3a559be9a3b0 [diff] |
Expand NavigationDownloadPolicy to contain 2 bitmasks: observed_types/disallowed_types Currently, NavigationDownloadPolicy can only be configured with a single allow/disallow type. This is insufficient for reporting download-related metrics at download-discovery time if the navigation types are not mutually exclusive: e.g. opener navigation, navigation from/in sandbox, navigation from/in AdFrame. Therefore, this CL expands NavigationDownloadPolicy so it's not only able to help with the download intervention decision, but also helps with metrics reporting. More background: This is a preliminary CL for a forthcoming change to expand the feature |blocking download in sandbox| to |blocking download initiated from sandbox as well as in sandbox|. We used to have that metric reported in AdsPageLoadMetricsObserver, but with the new scope, the desired information is no longer available in the observer. So the new plan is to store the desired information to download_policy, and record the metrics at download-discovery time in |NavigationRequest::OnResponseStarted|. Change-Id: Iebcd5c4216b25b1f0616f0ece01751c2a80c40cc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1501272 Commit-Queue: Yao Xiao <yaoxia@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Ken Rockot <rockot@google.com> Cr-Commit-Position: refs/heads/master@{#640067}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .