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 #include "net/http/http_cache_transaction.h" | 5 #include "net/http/http_cache_transaction.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
10 #include <unistd.h> | 10 #include <unistd.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/metrics/field_trial.h" | 18 #include "base/metrics/field_trial.h" |
19 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram.h" |
20 #include "base/rand_util.h" | 20 #include "base/rand_util.h" |
21 #include "base/string_number_conversions.h" | 21 #include "base/string_number_conversions.h" |
22 #include "base/string_util.h" | 22 #include "base/string_util.h" |
23 #include "base/time.h" | 23 #include "base/time.h" |
24 #include "net/base/cert_status_flags.h" | 24 #include "net/base/cert_status_flags.h" |
25 #include "net/base/completion_callback.h" | 25 #include "net/base/completion_callback.h" |
26 #include "net/base/io_buffer.h" | 26 #include "net/base/io_buffer.h" |
27 #include "net/base/load_flags.h" | 27 #include "net/base/load_flags.h" |
28 #include "net/base/net_errors.h" | 28 #include "net/base/net_errors.h" |
29 #include "net/base/net_log.h" | 29 #include "net/base/net_log.h" |
30 #include "net/base/ssl_cert_request_info.h" | |
31 #include "net/base/ssl_config_service.h" | |
32 #include "net/base/upload_data_stream.h" | 30 #include "net/base/upload_data_stream.h" |
33 #include "net/disk_cache/disk_cache.h" | 31 #include "net/disk_cache/disk_cache.h" |
34 #include "net/http/http_network_session.h" | 32 #include "net/http/http_network_session.h" |
35 #include "net/http/http_request_info.h" | 33 #include "net/http/http_request_info.h" |
36 #include "net/http/http_response_headers.h" | 34 #include "net/http/http_response_headers.h" |
| 35 #include "net/http/http_transaction.h" |
37 #include "net/http/http_transaction_delegate.h" | 36 #include "net/http/http_transaction_delegate.h" |
38 #include "net/http/http_transaction.h" | |
39 #include "net/http/http_util.h" | 37 #include "net/http/http_util.h" |
40 #include "net/http/partial_data.h" | 38 #include "net/http/partial_data.h" |
| 39 #include "net/ssl/ssl_cert_request_info.h" |
| 40 #include "net/ssl/ssl_config_service.h" |
41 | 41 |
42 using base::Time; | 42 using base::Time; |
43 using base::TimeDelta; | 43 using base::TimeDelta; |
44 using base::TimeTicks; | 44 using base::TimeTicks; |
45 | 45 |
46 namespace { | 46 namespace { |
47 | 47 |
48 // From http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-21#section-6 | 48 // From http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-21#section-6 |
49 // a "non-error response" is one with a 2xx (Successful) or 3xx | 49 // a "non-error response" is one with a 2xx (Successful) or 3xx |
50 // (Redirection) status code. | 50 // (Redirection) status code. |
(...skipping 2452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2503 } | 2503 } |
2504 | 2504 |
2505 int HttpCache::Transaction::ResetCacheIOStart(int return_value) { | 2505 int HttpCache::Transaction::ResetCacheIOStart(int return_value) { |
2506 DCHECK(cache_io_start_.is_null()); | 2506 DCHECK(cache_io_start_.is_null()); |
2507 if (return_value == ERR_IO_PENDING) | 2507 if (return_value == ERR_IO_PENDING) |
2508 cache_io_start_ = base::TimeTicks::Now(); | 2508 cache_io_start_ = base::TimeTicks::Now(); |
2509 return return_value; | 2509 return return_value; |
2510 } | 2510 } |
2511 | 2511 |
2512 } // namespace net | 2512 } // namespace net |
OLD | NEW |