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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 // On success, handling_206_ will be set to true if we are processing a | 344 // On success, handling_206_ will be set to true if we are processing a |
345 // partial entry. | 345 // partial entry. |
346 bool ValidatePartialResponse(); | 346 bool ValidatePartialResponse(); |
347 | 347 |
348 // Handles a response validation error by bypassing the cache. | 348 // Handles a response validation error by bypassing the cache. |
349 void IgnoreRangeRequest(); | 349 void IgnoreRangeRequest(); |
350 | 350 |
351 // Fixes the response headers to match expectations for a HEAD request. | 351 // Fixes the response headers to match expectations for a HEAD request. |
352 void FixHeadersForHead(); | 352 void FixHeadersForHead(); |
353 | 353 |
354 // Launches an asynchronous revalidation based on this transaction. | |
355 void TriggerAsyncValidation(); | |
356 | |
357 // Changes the response code of a range request to be 416 (Requested range not | 354 // Changes the response code of a range request to be 416 (Requested range not |
358 // satisfiable). | 355 // satisfiable). |
359 void FailRangeRequest(); | 356 void FailRangeRequest(); |
360 | 357 |
361 // Setups the transaction for reading from the cache entry. | 358 // Setups the transaction for reading from the cache entry. |
362 int SetupEntryForRead(); | 359 int SetupEntryForRead(); |
363 | 360 |
364 // Reads data from the network. | 361 // Reads data from the network. |
365 int ReadFromNetwork(IOBuffer* data, int data_len); | 362 int ReadFromNetwork(IOBuffer* data, int data_len); |
366 | 363 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; | 493 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; |
497 | 494 |
498 base::WeakPtrFactory<Transaction> weak_factory_; | 495 base::WeakPtrFactory<Transaction> weak_factory_; |
499 | 496 |
500 DISALLOW_COPY_AND_ASSIGN(Transaction); | 497 DISALLOW_COPY_AND_ASSIGN(Transaction); |
501 }; | 498 }; |
502 | 499 |
503 } // namespace net | 500 } // namespace net |
504 | 501 |
505 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 502 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
OLD | NEW |