Replace ProxyConfigSource with ProxyConfigWithAnnotation.
ProxyConfigSource is removed and ProxyConfigWithAnnotation class is
added to wrap a constant ProxyConfig and its NetworkTrafficAnnotation.
To goal is to provide an annotation wherever a ProxyConfig is modified,
so that the source of configs for proxies and their changes would be
traceable and transparent.
Bug: 656607
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.linux:linux_mojo;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I64f0eaad8f37682da4571b4a9aae69d974ce584d
Reviewed-on: https://chromium-review.googlesource.com/934126
Commit-Queue: Ramin Halavati <[email protected]>
Reviewed-by: Jochen Eisinger <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Helen Li <[email protected]>
Reviewed-by: Eric Roman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#542426}
diff --git a/net/websockets/websocket_test_util.cc b/net/websockets/websocket_test_util.cc
index d7bfdbc..ed8b9be 100644
--- a/net/websockets/websocket_test_util.cc
+++ b/net/websockets/websocket_test_util.cc
@@ -15,6 +15,7 @@
#include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/socket/socket_test_util.h"
#include "net/spdy/core/spdy_protocol.h"
+#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/websockets/websocket_basic_handshake_stream.h"
#include "url/origin.h"
@@ -226,7 +227,8 @@
void WebSocketTestURLRequestContextHost::SetProxyConfig(
const std::string& proxy_rules) {
DCHECK(!url_request_context_initialized_);
- proxy_resolution_service_ = ProxyResolutionService::CreateFixed(proxy_rules);
+ proxy_resolution_service_ = ProxyResolutionService::CreateFixed(
+ proxy_rules, TRAFFIC_ANNOTATION_FOR_TESTS);
url_request_context_.set_proxy_resolution_service(
proxy_resolution_service_.get());
}