OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TRANSACTION_H_ | 5 #ifndef NET_HTTP_HTTP_TRANSACTION_H_ |
6 #define NET_HTTP_HTTP_TRANSACTION_H_ | 6 #define NET_HTTP_HTTP_TRANSACTION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
11 #include "net/base/load_states.h" | 11 #include "net/base/load_states.h" |
12 #include "net/base/net_api.h" | 12 #include "net/base/net_export.h" |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 class BoundNetLog; | 16 class BoundNetLog; |
17 struct HttpRequestInfo; | 17 struct HttpRequestInfo; |
18 class HttpResponseInfo; | 18 class HttpResponseInfo; |
19 class IOBuffer; | 19 class IOBuffer; |
20 class X509Certificate; | 20 class X509Certificate; |
21 class SSLHostInfo; | 21 class SSLHostInfo; |
22 | 22 |
23 // Represents a single HTTP transaction (i.e., a single request/response pair). | 23 // Represents a single HTTP transaction (i.e., a single request/response pair). |
24 // HTTP redirects are not followed and authentication challenges are not | 24 // HTTP redirects are not followed and authentication challenges are not |
25 // answered. Cookies are assumed to be managed by the caller. | 25 // answered. Cookies are assumed to be managed by the caller. |
26 class NET_TEST HttpTransaction { | 26 class NET_EXPORT_PRIVATE HttpTransaction { |
27 public: | 27 public: |
28 // Stops any pending IO and destroys the transaction object. | 28 // Stops any pending IO and destroys the transaction object. |
29 virtual ~HttpTransaction() {} | 29 virtual ~HttpTransaction() {} |
30 | 30 |
31 // Starts the HTTP transaction (i.e., sends the HTTP request). | 31 // Starts the HTTP transaction (i.e., sends the HTTP request). |
32 // | 32 // |
33 // Returns OK if the transaction could be started synchronously, which means | 33 // Returns OK if the transaction could be started synchronously, which means |
34 // that the request was served from the cache. ERR_IO_PENDING is returned to | 34 // that the request was served from the cache. ERR_IO_PENDING is returned to |
35 // indicate that the CompletionCallback will be notified once response info | 35 // indicate that the CompletionCallback will be notified once response info |
36 // is available or if an IO error occurs. Any other return value indicates | 36 // is available or if an IO error occurs. Any other return value indicates |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 // SetSSLHostInfo sets a object which reads and writes public information | 110 // SetSSLHostInfo sets a object which reads and writes public information |
111 // about an SSL server. It's used to implement Snap Start. | 111 // about an SSL server. It's used to implement Snap Start. |
112 // TODO(agl): remove this. | 112 // TODO(agl): remove this. |
113 virtual void SetSSLHostInfo(SSLHostInfo*) { }; | 113 virtual void SetSSLHostInfo(SSLHostInfo*) { }; |
114 }; | 114 }; |
115 | 115 |
116 } // namespace net | 116 } // namespace net |
117 | 117 |
118 #endif // NET_HTTP_HTTP_TRANSACTION_H_ | 118 #endif // NET_HTTP_HTTP_TRANSACTION_H_ |
OLD | NEW |