From 65041fa2a7d79cbd289d6bfa05a55bfb32ec4fa3 Mon Sep 17 00:00:00 2001 From: "lzheng@chromium.org" Date: Fri, 21 May 2010 06:56:53 +0000 Subject: This change enables FieldTrial for SPDY. When --use-spdy=npn is used, field test won't be enabled. However, when that flag is missing, A/B test is added to browser_main.cc. Trial A: use npn and spdy. B: use npn but no spdy. C: do nothing. A and B are set to zero for now The histograms we collect are: 1. Page begin to finish time when spdy is enabled/disabled across all sites; 2. Page begin to finish time when spdy is used on sites that support spdy and when spdy is intentionally ignored. BUG=43997 TEST=Don't use --use-spdy=npn, manually change _npn_nospdy and _npn_withspdy percentile and go to spdy supported sites. Review URL: http://codereview.chromium.org/2036012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47896 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket/socket_test_util.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net/socket/socket_test_util.h') diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h index 6e0698f..dca6307 100644 --- a/net/socket/socket_test_util.h +++ b/net/socket/socket_test_util.h @@ -235,11 +235,13 @@ class DynamicSocketDataProvider : public SocketDataProvider { struct SSLSocketDataProvider { SSLSocketDataProvider(bool async, int result) : connect(async, result), - next_proto_status(SSLClientSocket::kNextProtoUnsupported) { } + next_proto_status(SSLClientSocket::kNextProtoUnsupported), + was_npn_negotiated(false) { } MockConnect connect; SSLClientSocket::NextProtoStatus next_proto_status; std::string next_proto; + bool was_npn_negotiated; }; // A DataProvider where the client must write a request before the reads (e.g. @@ -512,6 +514,7 @@ class MockSSLClientSocket : public MockClientSocket { // SSLClientSocket methods: virtual void GetSSLInfo(net::SSLInfo* ssl_info); virtual NextProtoStatus GetNextProto(std::string* proto); + virtual bool wasNpnNegotiated() const; // This MockSocket does not implement the manual async IO feature. virtual void OnReadComplete(const MockRead& data) { NOTIMPLEMENTED(); } -- cgit v1.1