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 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/memory/scoped_ptr.h" | |
gavinp
2015/06/16 23:54:46
Why is this being added, and not, say, "base/memor
Adam Rice
2015/06/17 10:18:00
When performing the original revert merge, I accid
| |
13 #include "base/time/time.h" | 14 #include "base/time/time.h" |
14 #include "net/base/completion_callback.h" | 15 #include "net/base/completion_callback.h" |
15 #include "net/base/request_priority.h" | 16 #include "net/base/request_priority.h" |
16 #include "net/http/http_cache.h" | 17 #include "net/http/http_cache.h" |
17 #include "net/http/http_request_headers.h" | 18 #include "net/http/http_request_headers.h" |
18 #include "net/http/http_response_headers.h" | 19 #include "net/http/http_response_headers.h" |
19 #include "net/http/http_response_info.h" | 20 #include "net/http/http_response_info.h" |
20 #include "net/http/http_transaction.h" | 21 #include "net/http/http_transaction.h" |
21 #include "net/log/net_log.h" | 22 #include "net/log/net_log.h" |
22 #include "net/socket/connection_attempts.h" | 23 #include "net/socket/connection_attempts.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 // On success, handling_206_ will be set to true if we are processing a | 334 // On success, handling_206_ will be set to true if we are processing a |
334 // partial entry. | 335 // partial entry. |
335 bool ValidatePartialResponse(); | 336 bool ValidatePartialResponse(); |
336 | 337 |
337 // Handles a response validation error by bypassing the cache. | 338 // Handles a response validation error by bypassing the cache. |
338 void IgnoreRangeRequest(); | 339 void IgnoreRangeRequest(); |
339 | 340 |
340 // Fixes the response headers to match expectations for a HEAD request. | 341 // Fixes the response headers to match expectations for a HEAD request. |
341 void FixHeadersForHead(); | 342 void FixHeadersForHead(); |
342 | 343 |
343 // Launches an asynchronous revalidation based on this transaction. | |
344 void TriggerAsyncValidation(); | |
345 | |
346 // 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 |
347 // satisfiable). | 345 // satisfiable). |
348 void FailRangeRequest(); | 346 void FailRangeRequest(); |
349 | 347 |
350 // Setups the transaction for reading from the cache entry. | 348 // Setups the transaction for reading from the cache entry. |
351 int SetupEntryForRead(); | 349 int SetupEntryForRead(); |
352 | 350 |
353 // Reads data from the network. | 351 // Reads data from the network. |
354 int ReadFromNetwork(IOBuffer* data, int data_len); | 352 int ReadFromNetwork(IOBuffer* data, int data_len); |
355 | 353 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
485 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; | 483 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; |
486 | 484 |
487 base::WeakPtrFactory<Transaction> weak_factory_; | 485 base::WeakPtrFactory<Transaction> weak_factory_; |
488 | 486 |
489 DISALLOW_COPY_AND_ASSIGN(Transaction); | 487 DISALLOW_COPY_AND_ASSIGN(Transaction); |
490 }; | 488 }; |
491 | 489 |
492 } // namespace net | 490 } // namespace net |
493 | 491 |
494 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 492 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
OLD | NEW |