OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ | |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ | |
7 | |
8 #include "net/http/http_stream_factory_impl.h" | |
9 | |
10 namespace net { | |
11 | |
12 // HttpStreamFactoryImpl subclass that can wait until a preconnect is complete. | |
13 class MockHttpStreamFactoryImplForPreconnect : public HttpStreamFactoryImpl { | |
14 public: | |
15 MockHttpStreamFactoryImplForPreconnect(HttpNetworkSession* session, | |
mmenke
2014/03/14 16:38:06
Should probably forward declare HttpNetworkSession
davidben
2014/03/14 18:35:03
Done.
| |
16 bool for_websockets); | |
17 | |
18 void WaitForPreconnects(); | |
19 | |
20 private: | |
21 // HttpStreamFactoryImpl methods. | |
22 virtual void OnPreconnectsCompleteInternal() OVERRIDE; | |
mmenke
2014/03/14 16:38:06
include macros.h
davidben
2014/03/14 18:35:03
Done.
| |
23 | |
24 bool preconnect_done_; | |
25 bool waiting_for_preconnect_; | |
mmenke
2014/03/14 16:38:06
DISALLOW_COPY_AND_ASSIGN?
davidben
2014/03/14 18:35:03
Done.
| |
26 }; | |
27 | |
28 } // namespace net | |
29 | |
30 #endif // NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ | |
OLD | NEW |