OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 10 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 void SetBeforeNetworkStartCallback( | 160 void SetBeforeNetworkStartCallback( |
161 const BeforeNetworkStartCallback& callback) override; | 161 const BeforeNetworkStartCallback& callback) override; |
162 void SetBeforeHeadersSentCallback( | 162 void SetBeforeHeadersSentCallback( |
163 const BeforeHeadersSentCallback& callback) override; | 163 const BeforeHeadersSentCallback& callback) override; |
164 int ResumeNetworkStart() override; | 164 int ResumeNetworkStart() override; |
165 void GetConnectionAttempts(ConnectionAttempts* out) const override; | 165 void GetConnectionAttempts(ConnectionAttempts* out) const override; |
166 | 166 |
167 // Returns the estimate of dynamically allocated memory in bytes. | 167 // Returns the estimate of dynamically allocated memory in bytes. |
168 size_t EstimateMemoryUsage() const; | 168 size_t EstimateMemoryUsage() const; |
169 | 169 |
| 170 // Any subsequent Read or IO callback should fail with the given result. |
| 171 void SetSharedWritingFailState(int result); |
| 172 |
| 173 RequestPriority priority() { return priority_; } |
| 174 PartialData* partial() { return partial_.get(); } |
| 175 |
170 private: | 176 private: |
171 static const size_t kNumValidationHeaders = 2; | 177 static const size_t kNumValidationHeaders = 2; |
172 // Helper struct to pair a header name with its value, for | 178 // Helper struct to pair a header name with its value, for |
173 // headers used to validate cache entries. | 179 // headers used to validate cache entries. |
174 struct ValidationHeaders { | 180 struct ValidationHeaders { |
175 ValidationHeaders() : initialized(false) {} | 181 ValidationHeaders() : initialized(false) {} |
176 | 182 |
177 std::string values[kNumValidationHeaders]; | 183 std::string values[kNumValidationHeaders]; |
178 bool initialized; | 184 bool initialized; |
179 }; | 185 }; |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 bool in_do_loop_; | 521 bool in_do_loop_; |
516 | 522 |
517 base::WeakPtrFactory<Transaction> weak_factory_; | 523 base::WeakPtrFactory<Transaction> weak_factory_; |
518 | 524 |
519 DISALLOW_COPY_AND_ASSIGN(Transaction); | 525 DISALLOW_COPY_AND_ASSIGN(Transaction); |
520 }; | 526 }; |
521 | 527 |
522 } // namespace net | 528 } // namespace net |
523 | 529 |
524 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 530 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
OLD | NEW |