OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
| 12 #include "base/gtest_prod_util.h" |
12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
13 #include "net/base/host_port_pair.h" | 14 #include "net/base/host_port_pair.h" |
14 #include "net/base/net_log.h" | 15 #include "net/base/net_log.h" |
15 #include "net/http/http_pipelined_host_pool.h" | 16 #include "net/http/http_pipelined_host_pool.h" |
16 #include "net/http/http_stream_factory.h" | 17 #include "net/http/http_stream_factory.h" |
17 #include "net/proxy/proxy_server.h" | 18 #include "net/proxy/proxy_server.h" |
18 #include "net/socket/ssl_client_socket.h" | 19 #include "net/socket/ssl_client_socket.h" |
19 #include "net/spdy/spdy_session_key.h" | 20 #include "net/spdy/spdy_session_key.h" |
20 | 21 |
21 namespace net { | 22 namespace net { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 virtual base::Value* PipelineInfoToValue() const OVERRIDE; | 60 virtual base::Value* PipelineInfoToValue() const OVERRIDE; |
60 virtual const HostMappingRules* GetHostMappingRules() const OVERRIDE; | 61 virtual const HostMappingRules* GetHostMappingRules() const OVERRIDE; |
61 | 62 |
62 // HttpPipelinedHostPool::Delegate interface | 63 // HttpPipelinedHostPool::Delegate interface |
63 virtual void OnHttpPipelinedHostHasAdditionalCapacity( | 64 virtual void OnHttpPipelinedHostHasAdditionalCapacity( |
64 HttpPipelinedHost* host) OVERRIDE; | 65 HttpPipelinedHost* host) OVERRIDE; |
65 | 66 |
66 size_t num_orphaned_jobs() const { return orphaned_job_set_.size(); } | 67 size_t num_orphaned_jobs() const { return orphaned_job_set_.size(); } |
67 | 68 |
68 private: | 69 private: |
69 class Request; | 70 FRIEND_TEST_ALL_PREFIXES(HttpStreamFactoryImplRequestTest, SetPriority); |
70 class Job; | 71 |
| 72 class NET_EXPORT_PRIVATE Request; |
| 73 class NET_EXPORT_PRIVATE Job; |
71 | 74 |
72 typedef std::set<Request*> RequestSet; | 75 typedef std::set<Request*> RequestSet; |
73 typedef std::vector<Request*> RequestVector; | 76 typedef std::vector<Request*> RequestVector; |
74 typedef std::map<SpdySessionKey, RequestSet> SpdySessionRequestMap; | 77 typedef std::map<SpdySessionKey, RequestSet> SpdySessionRequestMap; |
75 typedef std::map<HttpPipelinedHost::Key, | 78 typedef std::map<HttpPipelinedHost::Key, |
76 RequestVector> HttpPipeliningRequestMap; | 79 RequestVector> HttpPipeliningRequestMap; |
77 | 80 |
78 HttpStreamRequest* RequestStreamInternal( | 81 HttpStreamRequest* RequestStreamInternal( |
79 const HttpRequestInfo& info, | 82 const HttpRequestInfo& info, |
80 RequestPriority priority, | 83 RequestPriority priority, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // deleted when the factory is destroyed. | 149 // deleted when the factory is destroyed. |
147 std::set<const Job*> preconnect_job_set_; | 150 std::set<const Job*> preconnect_job_set_; |
148 | 151 |
149 const bool for_websockets_; | 152 const bool for_websockets_; |
150 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); | 153 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); |
151 }; | 154 }; |
152 | 155 |
153 } // namespace net | 156 } // namespace net |
154 | 157 |
155 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 158 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
OLD | NEW |