| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_NETWORK_LAYER_H_ | 5 #ifndef NET_HTTP_HTTP_NETWORK_LAYER_H_ |
| 6 #define NET_HTTP_HTTP_NETWORK_LAYER_H_ | 6 #define NET_HTTP_HTTP_NETWORK_LAYER_H_ |
| 7 | 7 |
| 8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "net/http/http_transaction_factory.h" | 10 #include "net/http/http_transaction_factory.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 SSLConfigService* ssl_config_service); | 38 SSLConfigService* ssl_config_service); |
| 39 // Create a transaction factory that instantiate a network layer over an | 39 // Create a transaction factory that instantiate a network layer over an |
| 40 // existing network session. Network session contains some valuable | 40 // existing network session. Network session contains some valuable |
| 41 // information (e.g. authentication data) that we want to share across | 41 // information (e.g. authentication data) that we want to share across |
| 42 // multiple network layers. This method exposes the implementation details | 42 // multiple network layers. This method exposes the implementation details |
| 43 // of a network layer, use this method with an existing network layer only | 43 // of a network layer, use this method with an existing network layer only |
| 44 // when network session is shared. | 44 // when network session is shared. |
| 45 static HttpTransactionFactory* CreateFactory(HttpNetworkSession* session); | 45 static HttpTransactionFactory* CreateFactory(HttpNetworkSession* session); |
| 46 | 46 |
| 47 // HttpTransactionFactory methods: | 47 // HttpTransactionFactory methods: |
| 48 virtual HttpTransaction* CreateTransaction(); | 48 virtual int CreateTransaction(scoped_ptr<HttpTransaction>* trans); |
| 49 virtual HttpCache* GetCache(); | 49 virtual HttpCache* GetCache(); |
| 50 virtual void Suspend(bool suspend); | 50 virtual void Suspend(bool suspend); |
| 51 | 51 |
| 52 HttpNetworkSession* GetSession(); | 52 HttpNetworkSession* GetSession(); |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 // The factory we will use to create network sockets. | 55 // The factory we will use to create network sockets. |
| 56 ClientSocketFactory* socket_factory_; | 56 ClientSocketFactory* socket_factory_; |
| 57 | 57 |
| 58 // The host resolver and proxy service that will be used when lazily | 58 // The host resolver and proxy service that will be used when lazily |
| 59 // creating |session_|. | 59 // creating |session_|. |
| 60 scoped_refptr<HostResolver> host_resolver_; | 60 scoped_refptr<HostResolver> host_resolver_; |
| 61 scoped_refptr<ProxyService> proxy_service_; | 61 scoped_refptr<ProxyService> proxy_service_; |
| 62 | 62 |
| 63 // The SSL config service being used for the session. | 63 // The SSL config service being used for the session. |
| 64 scoped_refptr<SSLConfigService> ssl_config_service_; | 64 scoped_refptr<SSLConfigService> ssl_config_service_; |
| 65 | 65 |
| 66 scoped_refptr<HttpNetworkSession> session_; | 66 scoped_refptr<HttpNetworkSession> session_; |
| 67 bool suspended_; | 67 bool suspended_; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace net | 70 } // namespace net |
| 71 | 71 |
| 72 #endif // NET_HTTP_HTTP_NETWORK_LAYER_H_ | 72 #endif // NET_HTTP_HTTP_NETWORK_LAYER_H_ |
| OLD | NEW |