Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1679)

Unified Diff: net/base/test_proxy_delegate.cc

Issue 2260623002: Race TCP connection to proxies with QUIC connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/test_proxy_delegate.cc
diff --git a/net/base/test_proxy_delegate.cc b/net/base/test_proxy_delegate.cc
index 0f476fdbb6904c499834d3b6b6999b0d996c7d04..d8a2dd7270ab253050eb26e2b1a651867a9f41a3 100644
--- a/net/base/test_proxy_delegate.cc
+++ b/net/base/test_proxy_delegate.cc
@@ -7,6 +7,7 @@
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "url/gurl.h"
RyanSturm 2016/08/19 19:03:23 Not sure you really need this header since you don
tbansal1 2016/08/20 01:53:39 Done.
namespace net {
@@ -79,4 +80,25 @@ bool TestProxyDelegate::IsTrustedSpdyProxy(
return proxy_server.is_valid() && trusted_spdy_proxy_ == proxy_server;
}
+void TestProxyDelegate::GetAlternativeProxy(
+ const GURL& url,
+ const ProxyServer& resolved_proxy_server,
+ ProxyServer* alternative_proxy_server) const {
+ EXPECT_TRUE(resolved_proxy_server.is_valid());
+ EXPECT_FALSE(alternative_proxy_server->is_valid());
+ *alternative_proxy_server = alternative_proxy_server_;
+}
+
+void TestProxyDelegate::SetAlternativeProxy(
+ const ProxyServer& alternative_proxy_server) {
+ alternative_proxy_server_ = alternative_proxy_server;
+}
+
+void TestProxyDelegate::OnAlternativeProxyBroken(
+ const ProxyServer& alternative_proxy_server) {
+ EXPECT_TRUE(alternative_proxy_server.is_valid());
+ EXPECT_EQ(alternative_proxy_server_, alternative_proxy_server);
+ alternative_proxy_server_ = ProxyServer();
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698