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 // This file declares HttpCache::Transaction, a private class of HttpCache so | 5 // This file declares HttpCache::Transaction, a private class of HttpCache so |
6 // it should only be included by http_cache.cc | 6 // it should only be included by http_cache.cc |
7 | 7 |
8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 const BoundNetLog&); | 102 const BoundNetLog&); |
103 virtual int RestartIgnoringLastError(CompletionCallback* callback); | 103 virtual int RestartIgnoringLastError(CompletionCallback* callback); |
104 virtual int RestartWithCertificate(X509Certificate* client_cert, | 104 virtual int RestartWithCertificate(X509Certificate* client_cert, |
105 CompletionCallback* callback); | 105 CompletionCallback* callback); |
106 virtual int RestartWithAuth(const string16& username, | 106 virtual int RestartWithAuth(const string16& username, |
107 const string16& password, | 107 const string16& password, |
108 CompletionCallback* callback); | 108 CompletionCallback* callback); |
109 virtual bool IsReadyToRestartForAuth(); | 109 virtual bool IsReadyToRestartForAuth(); |
110 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 110 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
111 virtual void StopCaching(); | 111 virtual void StopCaching(); |
| 112 virtual void DoneReading(); |
112 virtual const HttpResponseInfo* GetResponseInfo() const; | 113 virtual const HttpResponseInfo* GetResponseInfo() const; |
113 virtual LoadState GetLoadState() const; | 114 virtual LoadState GetLoadState() const; |
114 virtual uint64 GetUploadProgress(void) const; | 115 virtual uint64 GetUploadProgress(void) const; |
115 | 116 |
116 private: | 117 private: |
117 static const size_t kNumValidationHeaders = 2; | 118 static const size_t kNumValidationHeaders = 2; |
118 // Helper struct to pair a header name with its value, for | 119 // Helper struct to pair a header name with its value, for |
119 // headers used to validate cache entries. | 120 // headers used to validate cache entries. |
120 struct ValidationHeaders { | 121 struct ValidationHeaders { |
121 ValidationHeaders() : initialized(false) {} | 122 ValidationHeaders() : initialized(false) {} |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 uint64 final_upload_progress_; | 361 uint64 final_upload_progress_; |
361 CompletionCallbackImpl<Transaction> io_callback_; | 362 CompletionCallbackImpl<Transaction> io_callback_; |
362 scoped_refptr<CancelableCompletionCallback<Transaction> > cache_callback_; | 363 scoped_refptr<CancelableCompletionCallback<Transaction> > cache_callback_; |
363 scoped_refptr<CancelableCompletionCallback<Transaction> > | 364 scoped_refptr<CancelableCompletionCallback<Transaction> > |
364 write_headers_callback_; | 365 write_headers_callback_; |
365 }; | 366 }; |
366 | 367 |
367 } // namespace net | 368 } // namespace net |
368 | 369 |
369 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 370 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
OLD | NEW |