Commit 065d12c6 authored by Matt Falkenhagen's avatar Matt Falkenhagen Committed by Commit Bot

Loading Predictor: allow/blocklist in network annotation for prefetch.

Support from throttling was added in r782103, so update the network
annotation about policies. This copies the annotation code and text
from NavigationURLLoaderImpl, etc.

Bug: 1095842
Change-Id: I9ed3baf495eafc16ed375bd23493f2e855fd8313
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2425689
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809816}
parent 8c8c4211
...@@ -30,8 +30,6 @@ namespace predictors { ...@@ -30,8 +30,6 @@ namespace predictors {
namespace { namespace {
// TODO(crbug.com/1095842): Update the annotation once URL allowlist/blocklist
// are observed to limit the scope of the requests.
const net::NetworkTrafficAnnotationTag kPrefetchTrafficAnnotation = const net::NetworkTrafficAnnotationTag kPrefetchTrafficAnnotation =
net::DefineNetworkTrafficAnnotation("predictive_prefetch", net::DefineNetworkTrafficAnnotation("predictive_prefetch",
R"( R"(
...@@ -59,11 +57,21 @@ const net::NetworkTrafficAnnotationTag kPrefetchTrafficAnnotation = ...@@ -59,11 +57,21 @@ const net::NetworkTrafficAnnotationTag kPrefetchTrafficAnnotation =
"B) Disable Lite Mode under Settings > Advanced > Lite mode, or " "B) Disable Lite Mode under Settings > Advanced > Lite mode, or "
"C) Disable 'Make searches and browsing better' under Settings > " "C) Disable 'Make searches and browsing better' under Settings > "
" Sync and Google services > Make searches and browsing better" " Sync and Google services > Make searches and browsing better"
policy_exception_justification: "To be implemented" chrome_policy {
URLBlacklist {
URLBlacklist: { entries: '*' }
}
}
chrome_policy {
URLWhitelist {
URLWhitelist { }
}
}
} }
comments: comments:
"This feature can be safely disabled, but enabling it may result in " "This feature can be safely disabled, but enabling it may result in "
"faster page loads." "faster page loads. Using either URLBlacklist or URLWhitelist policies "
"(or a combination of both) limits the scope of these requests."
)"); )");
} // namespace } // namespace
......
...@@ -235,7 +235,7 @@ Refer to README.md for content description and update process. ...@@ -235,7 +235,7 @@ Refer to README.md for content description and update process.
<item id="popular_sites_fetch" added_in_milestone="62" hash_code="50755044" type="0" content_hash_code="6910083" os_list="linux,windows" file_path="components/ntp_tiles/popular_sites_impl.cc"/> <item id="popular_sites_fetch" added_in_milestone="62" hash_code="50755044" type="0" content_hash_code="6910083" os_list="linux,windows" file_path="components/ntp_tiles/popular_sites_impl.cc"/>
<item id="port_forwarding_controller_socket" added_in_milestone="65" hash_code="95075845" type="0" content_hash_code="122163428" os_list="linux,windows" file_path="chrome/browser/devtools/device/port_forwarding_controller.cc"/> <item id="port_forwarding_controller_socket" added_in_milestone="65" hash_code="95075845" type="0" content_hash_code="122163428" os_list="linux,windows" file_path="chrome/browser/devtools/device/port_forwarding_controller.cc"/>
<item id="ppapi_download_request" added_in_milestone="62" hash_code="135967426" type="0" content_hash_code="110461402" os_list="linux,windows" file_path="chrome/browser/safe_browsing/download_protection/ppapi_download_request.cc"/> <item id="ppapi_download_request" added_in_milestone="62" hash_code="135967426" type="0" content_hash_code="110461402" os_list="linux,windows" file_path="chrome/browser/safe_browsing/download_protection/ppapi_download_request.cc"/>
<item id="predictive_prefetch" added_in_milestone="85" hash_code="72157052" type="0" content_hash_code="69511160" os_list="linux,windows" file_path="chrome/browser/predictors/prefetch_manager.cc"/> <item id="predictive_prefetch" added_in_milestone="85" hash_code="72157052" type="0" content_hash_code="28097398" os_list="linux,windows" file_path="chrome/browser/predictors/prefetch_manager.cc"/>
<item id="prefetch_download" added_in_milestone="62" hash_code="44583172" type="0" content_hash_code="21424542" os_list="linux,windows" file_path="components/offline_pages/core/prefetch/prefetch_downloader_impl.cc"/> <item id="prefetch_download" added_in_milestone="62" hash_code="44583172" type="0" content_hash_code="21424542" os_list="linux,windows" file_path="components/offline_pages/core/prefetch/prefetch_downloader_impl.cc"/>
<item id="prefetch_visuals" added_in_milestone="75" hash_code="91068704" type="0" content_hash_code="90439946" os_list="linux,windows" file_path="components/offline_pages/core/prefetch/visuals_fetch_by_url.cc"/> <item id="prefetch_visuals" added_in_milestone="75" hash_code="91068704" type="0" content_hash_code="90439946" os_list="linux,windows" file_path="components/offline_pages/core/prefetch/visuals_fetch_by_url.cc"/>
<item id="previews_litepage_origin_prober" added_in_milestone="78" hash_code="33703614" type="0" deprecated="2020-04-23" content_hash_code="116235355" file_path="chrome/browser/previews/previews_lite_page_redirect_url_loader.cc"/> <item id="previews_litepage_origin_prober" added_in_milestone="78" hash_code="33703614" type="0" deprecated="2020-04-23" content_hash_code="116235355" file_path="chrome/browser/previews/previews_lite_page_redirect_url_loader.cc"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment