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}
28 files changed