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_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
| 15 #include "net/base/load_states.h" | 15 #include "net/base/load_states.h" |
| 16 #include "net/base/net_export.h" | 16 #include "net/base/net_export.h" |
| 17 #include "net/base/request_priority.h" | 17 #include "net/base/request_priority.h" |
| 18 #include "net/http/http_server_properties.h" | 18 #include "net/http/http_server_properties.h" |
| 19 #include "net/socket/connection_attempts.h" | 19 #include "net/socket/connection_attempts.h" |
| 20 // This file can be included from net/http even though | 20 // This file can be included from net/http even though |
| 21 // it is in net/websockets because it doesn't | 21 // it is in net/websockets because it doesn't |
| 22 // introduce any link dependency to net/websockets. | 22 // introduce any link dependency to net/websockets. |
| 23 #include "net/websockets/websocket_handshake_stream_base.h" | 23 #include "net/websockets/websocket_handshake_stream_base.h" |
| 24 | 24 |
| 25 namespace base { | |
| 26 namespace trace_event { | |
| 27 class ProcessMemoryDump; | |
| 28 } | |
| 29 } | |
| 30 | |
| 25 namespace net { | 31 namespace net { |
| 26 | 32 |
| 27 class AuthCredentials; | 33 class AuthCredentials; |
| 28 class BidirectionalStreamImpl; | 34 class BidirectionalStreamImpl; |
| 29 class HostMappingRules; | 35 class HostMappingRules; |
| 30 class HttpAuthController; | 36 class HttpAuthController; |
| 31 class HttpNetworkSession; | 37 class HttpNetworkSession; |
| 32 class HttpResponseHeaders; | 38 class HttpResponseHeaders; |
| 33 class HttpResponseInfo; | 39 class HttpResponseInfo; |
| 34 class HttpStream; | 40 class HttpStream; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 const SSLConfig& proxy_ssl_config, | 234 const SSLConfig& proxy_ssl_config, |
| 229 HttpStreamRequest::Delegate* delegate, | 235 HttpStreamRequest::Delegate* delegate, |
| 230 const NetLogWithSource& net_log) = 0; | 236 const NetLogWithSource& net_log) = 0; |
| 231 | 237 |
| 232 // Requests that enough connections for |num_streams| be opened. | 238 // Requests that enough connections for |num_streams| be opened. |
| 233 virtual void PreconnectStreams(int num_streams, | 239 virtual void PreconnectStreams(int num_streams, |
| 234 const HttpRequestInfo& info) = 0; | 240 const HttpRequestInfo& info) = 0; |
| 235 | 241 |
| 236 virtual const HostMappingRules* GetHostMappingRules() const = 0; | 242 virtual const HostMappingRules* GetHostMappingRules() const = 0; |
| 237 | 243 |
| 244 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name | |
| 245 // used by the parent MemoryAllocatorDump in the memory dump hierarchy. | |
| 246 virtual void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, | |
| 247 const std::string& parent_absolute_name) const {} | |
|
ssid
2017/01/18 23:51:52
Can we make it pure virtual, so that some other im
xunjieli
2017/01/19 14:50:41
Done.
| |
| 248 | |
| 238 protected: | 249 protected: |
| 239 HttpStreamFactory(); | 250 HttpStreamFactory(); |
| 240 | 251 |
| 241 private: | 252 private: |
| 242 url::SchemeHostPort RewriteHost(const url::SchemeHostPort& server); | 253 url::SchemeHostPort RewriteHost(const url::SchemeHostPort& server); |
| 243 | 254 |
| 244 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 255 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
| 245 }; | 256 }; |
| 246 | 257 |
| 247 } // namespace net | 258 } // namespace net |
| 248 | 259 |
| 249 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 260 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| OLD | NEW |