| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 bool AddTruncatedFlag(); | 103 bool AddTruncatedFlag(); |
| 104 | 104 |
| 105 // Returns the LoadState of the writer transaction of a given ActiveEntry. In | 105 // Returns the LoadState of the writer transaction of a given ActiveEntry. In |
| 106 // other words, returns the LoadState of this transaction without asking the | 106 // other words, returns the LoadState of this transaction without asking the |
| 107 // http cache, because this transaction should be the one currently writing | 107 // http cache, because this transaction should be the one currently writing |
| 108 // to the cache entry. | 108 // to the cache entry. |
| 109 LoadState GetWriterLoadState() const; | 109 LoadState GetWriterLoadState() const; |
| 110 | 110 |
| 111 CompletionCallback* io_callback() { return &io_callback_; } | 111 CompletionCallback* io_callback() { return &io_callback_; } |
| 112 | 112 |
| 113 const BoundNetLog& net_log() const; | |
| 114 | |
| 115 private: | 113 private: |
| 116 static const size_t kNumValidationHeaders = 2; | 114 static const size_t kNumValidationHeaders = 2; |
| 117 // Helper struct to pair a header name with its value, for | 115 // Helper struct to pair a header name with its value, for |
| 118 // headers used to validate cache entries. | 116 // headers used to validate cache entries. |
| 119 struct ValidationHeaders { | 117 struct ValidationHeaders { |
| 120 ValidationHeaders() : initialized(false) {} | 118 ValidationHeaders() : initialized(false) {} |
| 121 | 119 |
| 122 std::string values[kNumValidationHeaders]; | 120 std::string values[kNumValidationHeaders]; |
| 123 bool initialized; | 121 bool initialized; |
| 124 }; | 122 }; |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 uint64 final_upload_progress_; | 349 uint64 final_upload_progress_; |
| 352 CompletionCallbackImpl<Transaction> io_callback_; | 350 CompletionCallbackImpl<Transaction> io_callback_; |
| 353 scoped_refptr<CancelableCompletionCallback<Transaction> > cache_callback_; | 351 scoped_refptr<CancelableCompletionCallback<Transaction> > cache_callback_; |
| 354 scoped_refptr<CancelableCompletionCallback<Transaction> > | 352 scoped_refptr<CancelableCompletionCallback<Transaction> > |
| 355 write_headers_callback_; | 353 write_headers_callback_; |
| 356 }; | 354 }; |
| 357 | 355 |
| 358 } // namespace net | 356 } // namespace net |
| 359 | 357 |
| 360 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 358 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
| OLD | NEW |