Commit 0b5b8baa authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Add local annotation to ProxyResolutionService.

Adds a local annotation for system proxy configuration.

Bug: 656607
Change-Id: If4527e0d3de22db9546f9cbecfcdd00286da70e1
Reviewed-on: https://chromium-review.googlesource.com/960007
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543662}
parent 40947715
......@@ -60,6 +60,36 @@ namespace net {
namespace {
#if defined(OS_WIN) || defined(OS_IOS) || defined(OS_MACOSX) || \
(defined(OS_LINUX) && !defined(OS_CHROMEOS))
constexpr net::NetworkTrafficAnnotationTag kSystemProxyConfigTrafficAnnotation =
net::DefineNetworkTrafficAnnotation("proxy_config_system", R"(
semantics {
sender: "Proxy Config"
description:
"Establishing a connection through a proxy server using system proxy "
"settings."
trigger:
"Whenever a network request is made when the system proxy settings "
"are used, and they indicate to use a proxy server."
data:
"Proxy configuration."
destination: OTHER
destination_other:
"The proxy server specified in the configuration."
}
policy {
cookies_allowed: NO
setting:
"User cannot override system proxy settings, but can change them "
"through 'Advanced/System/Open proxy settings'."
policy_exception_justification:
"Using either of 'ProxyMode', 'ProxyServer', or 'ProxyPacUrl' "
"policies can set Chrome to use a specific proxy settings and avoid "
"system proxy."
})");
#endif
const size_t kDefaultNumPacThreads = 4;
// When the IP address changes we don't immediately re-run proxy auto-config.
......@@ -1454,16 +1484,15 @@ void ProxyResolutionService::ForceReloadProxyConfig() {
std::unique_ptr<ProxyConfigService>
ProxyResolutionService::CreateSystemProxyConfigService(
const scoped_refptr<base::SequencedTaskRunner>& io_task_runner) {
// TODO(https://crbug.com/656607): Add traffic annotation here.
#if defined(OS_WIN)
return std::make_unique<ProxyConfigServiceWin>(
NO_TRAFFIC_ANNOTATION_BUG_656607);
kSystemProxyConfigTrafficAnnotation);
#elif defined(OS_IOS)
return std::make_unique<ProxyConfigServiceIOS>(
NO_TRAFFIC_ANNOTATION_BUG_656607);
kSystemProxyConfigTrafficAnnotation);
#elif defined(OS_MACOSX)
return std::make_unique<ProxyConfigServiceMac>(
io_task_runner, NO_TRAFFIC_ANNOTATION_BUG_656607);
io_task_runner, kSystemProxyConfigTrafficAnnotation);
#elif defined(OS_CHROMEOS)
LOG(ERROR) << "ProxyConfigService for ChromeOS should be created in "
<< "profile_io_data.cc::CreateProxyConfigService and this should "
......@@ -1485,7 +1514,7 @@ ProxyResolutionService::CreateSystemProxyConfigService(
// keep us updated when the proxy config changes.
linux_config_service->SetupAndFetchInitialConfig(
glib_thread_task_runner, io_task_runner,
NO_TRAFFIC_ANNOTATION_BUG_656607);
kSystemProxyConfigTrafficAnnotation);
return std::move(linux_config_service);
#elif defined(OS_ANDROID)
......
......@@ -181,7 +181,8 @@ Refer to README.md for content description and update process.
<item id="proxy_config_direct" hash_code="119015679" type="0" content_hash_code="119931568" os_list="linux,windows" file_path="net/proxy_resolution/proxy_config_with_annotation.cc"/>
<item id="proxy_config_headless" hash_code="133221587" type="0" content_hash_code="77459277" os_list="linux,windows" file_path="headless/lib/browser/headless_url_request_context_getter.cc"/>
<item id="proxy_config_settings" hash_code="136468456" type="0" content_hash_code="19527377" os_list="linux,windows" file_path="components/proxy_config/pref_proxy_config_tracker_impl.cc"/>
<item id="proxy_script_fetcher" hash_code="37531401" type="0" deprecated="2018-03-15" content_hash_code="31866133" file_path=""/>
<item id="proxy_config_system" hash_code="11258689" type="0" content_hash_code="77057929" os_list="linux,windows" file_path="net/proxy_resolution/proxy_resolution_service.cc"/>
<item id="proxy_script_fetcher" hash_code="37531401" type="0" content_hash_code="31866133" os_list="windows" file_path="net/proxy_resolution/pac_file_fetcher_impl.cc"/>
<item id="puch_client_channel" hash_code="34459548" type="0" content_hash_code="92475475" os_list="linux,windows" file_path="components/invalidation/impl/push_client_channel.cc"/>
<item id="quic_chromium_incoming_session" hash_code="87635401" type="0" content_hash_code="78573093" os_list="linux,windows" file_path="net/quic/chromium/quic_chromium_client_session.cc"/>
<item id="quic_chromium_packet_writer" hash_code="20153177" type="0" content_hash_code="29657765" os_list="linux,windows" file_path="net/quic/chromium/quic_chromium_packet_writer.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