OLD | NEW |
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2010 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 "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 | 8 |
9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "net/http/http_request_info.h" | 23 #include "net/http/http_request_info.h" |
24 #include "net/http/http_response_headers.h" | 24 #include "net/http/http_response_headers.h" |
25 #include "net/http/http_transaction.h" | 25 #include "net/http/http_transaction.h" |
26 #include "net/http/http_util.h" | 26 #include "net/http/http_util.h" |
27 #include "net/http/partial_data.h" | 27 #include "net/http/partial_data.h" |
28 | 28 |
29 using base::Time; | 29 using base::Time; |
30 | 30 |
31 namespace net { | 31 namespace net { |
32 | 32 |
33 // disk cache entry data indices. | |
34 enum { | |
35 kResponseInfoIndex, | |
36 kResponseContentIndex, | |
37 kMetadataIndex | |
38 }; | |
39 | |
40 //----------------------------------------------------------------------------- | |
41 | |
42 struct HeaderNameAndValue { | 33 struct HeaderNameAndValue { |
43 const char* name; | 34 const char* name; |
44 const char* value; | 35 const char* value; |
45 }; | 36 }; |
46 | 37 |
47 // If the request includes one of these request headers, then avoid caching | 38 // If the request includes one of these request headers, then avoid caching |
48 // to avoid getting confused. | 39 // to avoid getting confused. |
49 static const HeaderNameAndValue kPassThroughHeaders[] = { | 40 static const HeaderNameAndValue kPassThroughHeaders[] = { |
50 { "if-unmodified-since", NULL }, // causes unexpected 412s | 41 { "if-unmodified-since", NULL }, // causes unexpected 412s |
51 { "if-match", NULL }, // causes unexpected 412s | 42 { "if-match", NULL }, // causes unexpected 412s |
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1816 // |value| goes from 0 to 63. Actually, the max value should be 47 (0x2f) | 1807 // |value| goes from 0 to 63. Actually, the max value should be 47 (0x2f) |
1817 // but we'll see. | 1808 // but we'll see. |
1818 UMA_HISTOGRAM_ENUMERATION("HttpCache.ResponseHeaders", value, 65); | 1809 UMA_HISTOGRAM_ENUMERATION("HttpCache.ResponseHeaders", value, 65); |
1819 } | 1810 } |
1820 | 1811 |
1821 void HttpCache::Transaction::OnIOComplete(int result) { | 1812 void HttpCache::Transaction::OnIOComplete(int result) { |
1822 DoLoop(result); | 1813 DoLoop(result); |
1823 } | 1814 } |
1824 | 1815 |
1825 } // namespace net | 1816 } // namespace net |
OLD | NEW |