Chromium Code Reviews| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 | 111 |
| 112 // Invoked when an orphaned Job finishes. | 112 // Invoked when an orphaned Job finishes. |
| 113 void OnOrphanedJobComplete(const Job* job); | 113 void OnOrphanedJobComplete(const Job* job); |
| 114 | 114 |
| 115 // Invoked when the Job finishes preconnecting sockets. | 115 // Invoked when the Job finishes preconnecting sockets. |
| 116 void OnPreconnectsComplete(const Job* job); | 116 void OnPreconnectsComplete(const Job* job); |
| 117 | 117 |
| 118 // Called when the Preconnect completes. Used for testing. | 118 // Called when the Preconnect completes. Used for testing. |
| 119 virtual void OnPreconnectsCompleteInternal() {} | 119 virtual void OnPreconnectsCompleteInternal() {} |
| 120 | 120 |
| 121 // Returns true if QUIC is whitelisted for |host|. | |
|
Ryan Sleevi
2016/01/12 01:28:06
comment nit: Note about format of host (I presume
Ryan Hamilton
2016/01/12 05:42:37
Done.
| |
| 122 bool IsQuicWhitelistedForHost(const std::string& host); | |
| 123 | |
| 121 HttpNetworkSession* const session_; | 124 HttpNetworkSession* const session_; |
| 122 | 125 |
| 123 // All Requests are handed out to clients. By the time HttpStreamFactoryImpl | 126 // All Requests are handed out to clients. By the time HttpStreamFactoryImpl |
| 124 // is destroyed, all Requests should be deleted (which should remove them from | 127 // is destroyed, all Requests should be deleted (which should remove them from |
| 125 // |request_map_|. The Requests will delete the corresponding job. | 128 // |request_map_|. The Requests will delete the corresponding job. |
| 126 std::map<const Job*, Request*> request_map_; | 129 std::map<const Job*, Request*> request_map_; |
| 127 | 130 |
| 128 SpdySessionRequestMap spdy_session_request_map_; | 131 SpdySessionRequestMap spdy_session_request_map_; |
| 129 | 132 |
| 130 // These jobs correspond to jobs orphaned by Requests and now owned by | 133 // These jobs correspond to jobs orphaned by Requests and now owned by |
| 131 // HttpStreamFactoryImpl. Since they are no longer tied to Requests, they will | 134 // HttpStreamFactoryImpl. Since they are no longer tied to Requests, they will |
| 132 // not be canceled when Requests are canceled. Therefore, in | 135 // not be canceled when Requests are canceled. Therefore, in |
| 133 // ~HttpStreamFactoryImpl, it is possible for some jobs to still exist in this | 136 // ~HttpStreamFactoryImpl, it is possible for some jobs to still exist in this |
| 134 // set. Leftover jobs will be deleted when the factory is destroyed. | 137 // set. Leftover jobs will be deleted when the factory is destroyed. |
| 135 std::set<const Job*> orphaned_job_set_; | 138 std::set<const Job*> orphaned_job_set_; |
| 136 | 139 |
| 137 // These jobs correspond to preconnect requests and have no associated Request | 140 // These jobs correspond to preconnect requests and have no associated Request |
| 138 // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be | 141 // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be |
| 139 // deleted when the factory is destroyed. | 142 // deleted when the factory is destroyed. |
| 140 std::set<const Job*> preconnect_job_set_; | 143 std::set<const Job*> preconnect_job_set_; |
| 141 | 144 |
| 142 const bool for_websockets_; | 145 const bool for_websockets_; |
| 143 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); | 146 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); |
| 144 }; | 147 }; |
| 145 | 148 |
| 146 } // namespace net | 149 } // namespace net |
| 147 | 150 |
| 148 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 151 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
| OLD | NEW |