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_ |