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 |
113 private: | 115 private: |
114 static const size_t kNumValidationHeaders = 2; | 116 static const size_t kNumValidationHeaders = 2; |
115 // Helper struct to pair a header name with its value, for | 117 // Helper struct to pair a header name with its value, for |
116 // headers used to validate cache entries. | 118 // headers used to validate cache entries. |
117 struct ValidationHeaders { | 119 struct ValidationHeaders { |
118 ValidationHeaders() : initialized(false) {} | 120 ValidationHeaders() : initialized(false) {} |
119 | 121 |
120 std::string values[kNumValidationHeaders]; | 122 std::string values[kNumValidationHeaders]; |
121 bool initialized; | 123 bool initialized; |
122 }; | 124 }; |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 uint64 final_upload_progress_; | 351 uint64 final_upload_progress_; |
350 CompletionCallbackImpl<Transaction> io_callback_; | 352 CompletionCallbackImpl<Transaction> io_callback_; |
351 scoped_refptr<CancelableCompletionCallback<Transaction> > cache_callback_; | 353 scoped_refptr<CancelableCompletionCallback<Transaction> > cache_callback_; |
352 scoped_refptr<CancelableCompletionCallback<Transaction> > | 354 scoped_refptr<CancelableCompletionCallback<Transaction> > |
353 write_headers_callback_; | 355 write_headers_callback_; |
354 }; | 356 }; |
355 | 357 |
356 } // namespace net | 358 } // namespace net |
357 | 359 |
358 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 360 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
OLD | NEW |