| 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 | 7 |
| 8 #include "net/base/completion_callback.h" | 8 #include "net/base/completion_callback.h" |
| 9 #include "net/base/load_states.h" | 9 #include "net/base/load_states.h" |
| 10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 const CompletionCallback& callback) = 0; | 68 const CompletionCallback& callback) = 0; |
| 69 | 69 |
| 70 // Returns true if auth is ready to be continued. Callers should check | 70 // Returns true if auth is ready to be continued. Callers should check |
| 71 // this value anytime Start() completes: if it is true, the transaction | 71 // this value anytime Start() completes: if it is true, the transaction |
| 72 // can be resumed with RestartWithAuth(L"", L"", callback) to resume | 72 // can be resumed with RestartWithAuth(L"", L"", callback) to resume |
| 73 // the automatic auth exchange. This notification gives the caller a | 73 // the automatic auth exchange. This notification gives the caller a |
| 74 // chance to process the response headers from all of the intermediate | 74 // chance to process the response headers from all of the intermediate |
| 75 // restarts needed for authentication. | 75 // restarts needed for authentication. |
| 76 virtual bool IsReadyToRestartForAuth() = 0; | 76 virtual bool IsReadyToRestartForAuth() = 0; |
| 77 | 77 |
| 78 // Check whether http request has authentication credentials. |
| 79 virtual bool HasAuth() const = 0; |
| 80 |
| 78 // Once response info is available for the transaction, response data may be | 81 // Once response info is available for the transaction, response data may be |
| 79 // read by calling this method. | 82 // read by calling this method. |
| 80 // | 83 // |
| 81 // Response data is copied into the given buffer and the number of bytes | 84 // Response data is copied into the given buffer and the number of bytes |
| 82 // copied is returned. ERR_IO_PENDING is returned if response data is not | 85 // copied is returned. ERR_IO_PENDING is returned if response data is not |
| 83 // yet available. The CompletionCallback is notified when the data copy | 86 // yet available. The CompletionCallback is notified when the data copy |
| 84 // completes, and it is passed the number of bytes that were successfully | 87 // completes, and it is passed the number of bytes that were successfully |
| 85 // copied. Or, if a read error occurs, the CompletionCallback is notified of | 88 // copied. Or, if a read error occurs, the CompletionCallback is notified of |
| 86 // the error. Any other negative return value indicates that the transaction | 89 // the error. Any other negative return value indicates that the transaction |
| 87 // could not be read. | 90 // could not be read. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 118 // does not modify |load_timing_info| if not currently connected. | 121 // does not modify |load_timing_info| if not currently connected. |
| 119 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const = 0; | 122 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const = 0; |
| 120 | 123 |
| 121 // Called when the priority of the parent job changes. | 124 // Called when the priority of the parent job changes. |
| 122 virtual void SetPriority(RequestPriority priority) = 0; | 125 virtual void SetPriority(RequestPriority priority) = 0; |
| 123 }; | 126 }; |
| 124 | 127 |
| 125 } // namespace net | 128 } // namespace net |
| 126 | 129 |
| 127 #endif // NET_HTTP_HTTP_TRANSACTION_H_ | 130 #endif // NET_HTTP_HTTP_TRANSACTION_H_ |
| OLD | NEW |