| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // with privacy mode |privacy_mode| is ready. | 167 // with privacy mode |privacy_mode| is ready. |
| 168 void OnStreamReady(const ProxyInfo& proxy_info, PrivacyMode privacy_mode); | 168 void OnStreamReady(const ProxyInfo& proxy_info, PrivacyMode privacy_mode); |
| 169 | 169 |
| 170 // Returns true if |proxy_info| contains a proxy server that supports request | 170 // Returns true if |proxy_info| contains a proxy server that supports request |
| 171 // priorities. | 171 // priorities. |
| 172 bool ProxyServerSupportsPriorities(const ProxyInfo& proxy_info) const; | 172 bool ProxyServerSupportsPriorities(const ProxyInfo& proxy_info) const; |
| 173 | 173 |
| 174 // Adds the count of JobControllers that are not completed to UMA histogram if | 174 // Adds the count of JobControllers that are not completed to UMA histogram if |
| 175 // the count is a multiple of 100: 100, 200, 400, etc. Break down | 175 // the count is a multiple of 100: 100, 200, 400, etc. Break down |
| 176 // JobControllers count based on the type of JobController. | 176 // JobControllers count based on the type of JobController. |
| 177 void AddJobControllerCountToHistograms() const; | 177 void AddJobControllerCountToHistograms(); |
| 178 | 178 |
| 179 HttpNetworkSession* const session_; | 179 HttpNetworkSession* const session_; |
| 180 | 180 |
| 181 // All Requests/Preconnects are assigned with a JobController to manage | 181 // All Requests/Preconnects are assigned with a JobController to manage |
| 182 // serving Job(s). JobController might outlive Request when Request | 182 // serving Job(s). JobController might outlive Request when Request |
| 183 // is served while there's some working Job left. JobController will be | 183 // is served while there's some working Job left. JobController will be |
| 184 // deleted from |job_controller_set_| when it determines the completion of | 184 // deleted from |job_controller_set_| when it determines the completion of |
| 185 // its work. | 185 // its work. |
| 186 JobControllerSet job_controller_set_; | 186 JobControllerSet job_controller_set_; |
| 187 | 187 |
| 188 // Factory used by job controllers for creating jobs. | 188 // Factory used by job controllers for creating jobs. |
| 189 std::unique_ptr<JobFactory> job_factory_; | 189 std::unique_ptr<JobFactory> job_factory_; |
| 190 | 190 |
| 191 // Set of proxy servers that support request priorities to which subsequent | 191 // Set of proxy servers that support request priorities to which subsequent |
| 192 // preconnects should be skipped. | 192 // preconnects should be skipped. |
| 193 std::set<PreconnectingProxyServer> preconnecting_proxy_servers_; | 193 std::set<PreconnectingProxyServer> preconnecting_proxy_servers_; |
| 194 | 194 |
| 195 SpdySessionRequestMap spdy_session_request_map_; | 195 SpdySessionRequestMap spdy_session_request_map_; |
| 196 | 196 |
| 197 const bool for_websockets_; | 197 const bool for_websockets_; |
| 198 | 198 |
| 199 // The count of JobControllers that was most recently logged to histograms. |
| 200 size_t last_logged_job_controller_count_; |
| 201 |
| 199 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); | 202 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); |
| 200 }; | 203 }; |
| 201 | 204 |
| 202 } // namespace net | 205 } // namespace net |
| 203 | 206 |
| 204 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 207 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
| OLD | NEW |