| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 bool ConditionalizeRequest(); | 328 bool ConditionalizeRequest(); |
| 329 | 329 |
| 330 // Makes sure that a 206 response is expected. Returns true on success. | 330 // Makes sure that a 206 response is expected. Returns true on success. |
| 331 // On success, handling_206_ will be set to true if we are processing a | 331 // On success, handling_206_ will be set to true if we are processing a |
| 332 // partial entry. | 332 // partial entry. |
| 333 bool ValidatePartialResponse(); | 333 bool ValidatePartialResponse(); |
| 334 | 334 |
| 335 // Handles a response validation error by bypassing the cache. | 335 // Handles a response validation error by bypassing the cache. |
| 336 void IgnoreRangeRequest(); | 336 void IgnoreRangeRequest(); |
| 337 | 337 |
| 338 // Removes content-length and byte range related info if needed. | 338 // Fixes the response headers to match expectations for a HEAD request. |
| 339 void FixHeadersForHead(); | 339 void FixHeadersForHead(); |
| 340 | 340 |
| 341 // Launches an asynchronous revalidation based on this transaction. | 341 // Launches an asynchronous revalidation based on this transaction. |
| 342 void TriggerAsyncValidation(); | 342 void TriggerAsyncValidation(); |
| 343 | 343 |
| 344 // Changes the response code of a range request to be 416 (Requested range not | 344 // Changes the response code of a range request to be 416 (Requested range not |
| 345 // satisfiable). | 345 // satisfiable). |
| 346 void FailRangeRequest(); | 346 void FailRangeRequest(); |
| 347 | 347 |
| 348 // Setups the transaction for reading from the cache entry. | 348 // Setups the transaction for reading from the cache entry. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; | 481 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; |
| 482 | 482 |
| 483 base::WeakPtrFactory<Transaction> weak_factory_; | 483 base::WeakPtrFactory<Transaction> weak_factory_; |
| 484 | 484 |
| 485 DISALLOW_COPY_AND_ASSIGN(Transaction); | 485 DISALLOW_COPY_AND_ASSIGN(Transaction); |
| 486 }; | 486 }; |
| 487 | 487 |
| 488 } // namespace net | 488 } // namespace net |
| 489 | 489 |
| 490 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 490 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
| OLD | NEW |