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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 virtual int Read(IOBuffer* buf, | 117 virtual int Read(IOBuffer* buf, |
118 int buf_len, | 118 int buf_len, |
119 const CompletionCallback& callback) OVERRIDE; | 119 const CompletionCallback& callback) OVERRIDE; |
120 virtual void StopCaching() OVERRIDE; | 120 virtual void StopCaching() OVERRIDE; |
121 virtual void DoneReading() OVERRIDE; | 121 virtual void DoneReading() OVERRIDE; |
122 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; | 122 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; |
123 virtual LoadState GetLoadState() const OVERRIDE; | 123 virtual LoadState GetLoadState() const OVERRIDE; |
124 virtual UploadProgress GetUploadProgress(void) const OVERRIDE; | 124 virtual UploadProgress GetUploadProgress(void) const OVERRIDE; |
125 virtual bool GetLoadTimingInfo( | 125 virtual bool GetLoadTimingInfo( |
126 LoadTimingInfo* load_timing_info) const OVERRIDE; | 126 LoadTimingInfo* load_timing_info) const OVERRIDE; |
| 127 virtual void SetPriority(RequestPriority priority) OVERRIDE; |
127 | 128 |
128 private: | 129 private: |
| 130 friend class HttpCacheTransactionTest; |
| 131 |
129 static const size_t kNumValidationHeaders = 2; | 132 static const size_t kNumValidationHeaders = 2; |
130 // Helper struct to pair a header name with its value, for | 133 // Helper struct to pair a header name with its value, for |
131 // headers used to validate cache entries. | 134 // headers used to validate cache entries. |
132 struct ValidationHeaders { | 135 struct ValidationHeaders { |
133 ValidationHeaders() : initialized(false) {} | 136 ValidationHeaders() : initialized(false) {} |
134 | 137 |
135 std::string values[kNumValidationHeaders]; | 138 std::string values[kNumValidationHeaders]; |
136 bool initialized; | 139 bool initialized; |
137 }; | 140 }; |
138 | 141 |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 // For sensitivity analysis, the simulated increase in cache service times, | 441 // For sensitivity analysis, the simulated increase in cache service times, |
439 // in percent. | 442 // in percent. |
440 int sensitivity_analysis_percent_increase_; | 443 int sensitivity_analysis_percent_increase_; |
441 | 444 |
442 HttpTransactionDelegate* transaction_delegate_; | 445 HttpTransactionDelegate* transaction_delegate_; |
443 }; | 446 }; |
444 | 447 |
445 } // namespace net | 448 } // namespace net |
446 | 449 |
447 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 450 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
OLD | NEW |