| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // http cache, because this transaction should be the one currently writing | 92 // http cache, because this transaction should be the one currently writing |
| 93 // to the cache entry. | 93 // to the cache entry. |
| 94 LoadState GetWriterLoadState() const; | 94 LoadState GetWriterLoadState() const; |
| 95 | 95 |
| 96 OldCompletionCallback* io_callback() { return &io_callback_; } | 96 OldCompletionCallback* io_callback() { return &io_callback_; } |
| 97 | 97 |
| 98 const BoundNetLog& net_log() const; | 98 const BoundNetLog& net_log() const; |
| 99 | 99 |
| 100 // HttpTransaction methods: | 100 // HttpTransaction methods: |
| 101 virtual int Start(const HttpRequestInfo*, OldCompletionCallback*, | 101 virtual int Start(const HttpRequestInfo*, OldCompletionCallback*, |
| 102 const BoundNetLog&); | 102 const BoundNetLog&) OVERRIDE; |
| 103 virtual int RestartIgnoringLastError(OldCompletionCallback* callback); | 103 virtual int RestartIgnoringLastError( |
| 104 OldCompletionCallback* callback) OVERRIDE; |
| 104 virtual int RestartWithCertificate(X509Certificate* client_cert, | 105 virtual int RestartWithCertificate(X509Certificate* client_cert, |
| 105 OldCompletionCallback* callback); | 106 OldCompletionCallback* callback) OVERRIDE; |
| 106 virtual int RestartWithAuth(const AuthCredentials& credentials, | 107 virtual int RestartWithAuth(const AuthCredentials& credentials, |
| 107 OldCompletionCallback* callback); | 108 OldCompletionCallback* callback) OVERRIDE; |
| 108 virtual bool IsReadyToRestartForAuth(); | 109 virtual bool IsReadyToRestartForAuth() OVERRIDE; |
| 109 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); | 110 virtual int Read(IOBuffer* buf, |
| 110 virtual void StopCaching(); | 111 int buf_len, |
| 111 virtual void DoneReading(); | 112 OldCompletionCallback* callback) OVERRIDE; |
| 112 virtual const HttpResponseInfo* GetResponseInfo() const; | 113 virtual void StopCaching() OVERRIDE; |
| 113 virtual LoadState GetLoadState() const; | 114 virtual void DoneReading() OVERRIDE; |
| 114 virtual uint64 GetUploadProgress(void) const; | 115 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; |
| 116 virtual LoadState GetLoadState() const OVERRIDE; |
| 117 virtual uint64 GetUploadProgress(void) const OVERRIDE; |
| 115 | 118 |
| 116 private: | 119 private: |
| 117 static const size_t kNumValidationHeaders = 2; | 120 static const size_t kNumValidationHeaders = 2; |
| 118 // Helper struct to pair a header name with its value, for | 121 // Helper struct to pair a header name with its value, for |
| 119 // headers used to validate cache entries. | 122 // headers used to validate cache entries. |
| 120 struct ValidationHeaders { | 123 struct ValidationHeaders { |
| 121 ValidationHeaders() : initialized(false) {} | 124 ValidationHeaders() : initialized(false) {} |
| 122 | 125 |
| 123 std::string values[kNumValidationHeaders]; | 126 std::string values[kNumValidationHeaders]; |
| 124 bool initialized; | 127 bool initialized; |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 uint64 final_upload_progress_; | 362 uint64 final_upload_progress_; |
| 360 OldCompletionCallbackImpl<Transaction> io_callback_; | 363 OldCompletionCallbackImpl<Transaction> io_callback_; |
| 361 scoped_refptr<CancelableOldCompletionCallback<Transaction> > cache_callback_; | 364 scoped_refptr<CancelableOldCompletionCallback<Transaction> > cache_callback_; |
| 362 scoped_refptr<CancelableOldCompletionCallback<Transaction> > | 365 scoped_refptr<CancelableOldCompletionCallback<Transaction> > |
| 363 write_headers_callback_; | 366 write_headers_callback_; |
| 364 }; | 367 }; |
| 365 | 368 |
| 366 } // namespace net | 369 } // namespace net |
| 367 | 370 |
| 368 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 371 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
| OLD | NEW |