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

Unified Diff: net/http/http_stream_factory_test_util.h

Issue 197283012: Retry requests on reused sockets that receive ERR_EMPTY_RESPONSE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/http/http_stream_factory_test_util.h
diff --git a/net/http/http_stream_factory_test_util.h b/net/http/http_stream_factory_test_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..6ccc2f27d1108a0006a1e23720fa2d6ddec7151a
--- /dev/null
+++ b/net/http/http_stream_factory_test_util.h
@@ -0,0 +1,30 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_
+#define NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_
+
+#include "net/http/http_stream_factory_impl.h"
+
+namespace net {
+
+// HttpStreamFactoryImpl subclass that can wait until a preconnect is complete.
+class MockHttpStreamFactoryImplForPreconnect : public HttpStreamFactoryImpl {
+ public:
+ MockHttpStreamFactoryImplForPreconnect(HttpNetworkSession* session,
mmenke 2014/03/14 16:38:06 Should probably forward declare HttpNetworkSession
davidben 2014/03/14 18:35:03 Done.
+ bool for_websockets);
+
+ void WaitForPreconnects();
+
+ private:
+ // HttpStreamFactoryImpl methods.
+ virtual void OnPreconnectsCompleteInternal() OVERRIDE;
mmenke 2014/03/14 16:38:06 include macros.h
davidben 2014/03/14 18:35:03 Done.
+
+ bool preconnect_done_;
+ bool waiting_for_preconnect_;
mmenke 2014/03/14 16:38:06 DISALLOW_COPY_AND_ASSIGN?
davidben 2014/03/14 18:35:03 Done.
+};
+
+} // namespace net
+
+#endif // NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698