OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
7 rights reserved. | 7 rights reserved. |
8 | 8 |
9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "platform/loader/fetch/FetchInitiatorTypeNames.h" | 35 #include "platform/loader/fetch/FetchInitiatorTypeNames.h" |
36 #include "platform/loader/fetch/FetchRequest.h" | 36 #include "platform/loader/fetch/FetchRequest.h" |
37 #include "platform/loader/fetch/IntegrityMetadata.h" | 37 #include "platform/loader/fetch/IntegrityMetadata.h" |
38 #include "platform/loader/fetch/MemoryCache.h" | 38 #include "platform/loader/fetch/MemoryCache.h" |
39 #include "platform/loader/fetch/ResourceClient.h" | 39 #include "platform/loader/fetch/ResourceClient.h" |
40 #include "platform/loader/fetch/ResourceClientWalker.h" | 40 #include "platform/loader/fetch/ResourceClientWalker.h" |
41 #include "platform/loader/fetch/ResourceLoader.h" | 41 #include "platform/loader/fetch/ResourceLoader.h" |
42 #include "platform/network/HTTPParsers.h" | 42 #include "platform/network/HTTPParsers.h" |
43 #include "platform/weborigin/KURL.h" | 43 #include "platform/weborigin/KURL.h" |
44 #include "public/platform/Platform.h" | 44 #include "public/platform/Platform.h" |
45 #include "public/platform/WebCachePolicy.h" | |
46 #include "public/platform/WebScheduler.h" | 45 #include "public/platform/WebScheduler.h" |
47 #include "public/platform/WebSecurityOrigin.h" | 46 #include "public/platform/WebSecurityOrigin.h" |
48 #include "wtf/CurrentTime.h" | 47 #include "wtf/CurrentTime.h" |
49 #include "wtf/MathExtras.h" | 48 #include "wtf/MathExtras.h" |
50 #include "wtf/StdLibExtras.h" | 49 #include "wtf/StdLibExtras.h" |
51 #include "wtf/Vector.h" | 50 #include "wtf/Vector.h" |
52 #include "wtf/text/CString.h" | 51 #include "wtf/text/CString.h" |
53 #include "wtf/text/StringBuilder.h" | 52 #include "wtf/text/StringBuilder.h" |
54 #include <algorithm> | 53 #include <algorithm> |
55 #include <cassert> | 54 #include <cassert> |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 overheadDump->guid(), String(WTF::Partitions::kAllocatedObjectPoolName)); | 912 overheadDump->guid(), String(WTF::Partitions::kAllocatedObjectPoolName)); |
914 } | 913 } |
915 | 914 |
916 String Resource::getMemoryDumpName() const { | 915 String Resource::getMemoryDumpName() const { |
917 return String::format( | 916 return String::format( |
918 "web_cache/%s_resources/%ld", | 917 "web_cache/%s_resources/%ld", |
919 resourceTypeToString(getType(), options().initiatorInfo.name), | 918 resourceTypeToString(getType(), options().initiatorInfo.name), |
920 m_identifier); | 919 m_identifier); |
921 } | 920 } |
922 | 921 |
923 void Resource::setCachePolicyBypassingCache() { | |
924 m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache); | |
925 } | |
926 | |
927 void Resource::setPreviewsStateNoTransform() { | |
928 m_resourceRequest.setPreviewsState(WebURLRequest::PreviewsNoTransform); | |
929 } | |
930 | |
931 void Resource::clearRangeRequestHeader() { | |
932 m_resourceRequest.clearHTTPHeaderField("range"); | |
933 } | |
934 | |
935 void Resource::revalidationSucceeded( | 922 void Resource::revalidationSucceeded( |
936 const ResourceResponse& validatingResponse) { | 923 const ResourceResponse& validatingResponse) { |
937 SECURITY_CHECK(m_redirectChain.isEmpty()); | 924 SECURITY_CHECK(m_redirectChain.isEmpty()); |
938 SECURITY_CHECK(equalIgnoringFragmentIdentifier(validatingResponse.url(), | 925 SECURITY_CHECK(equalIgnoringFragmentIdentifier(validatingResponse.url(), |
939 response().url())); | 926 response().url())); |
940 m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming()); | 927 m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming()); |
941 | 928 |
942 // RFC2616 10.3.5 | 929 // RFC2616 10.3.5 |
943 // Update cached headers from the 304 response | 930 // Update cached headers from the 304 response |
944 const HTTPHeaderMap& newHeaders = validatingResponse.httpHeaderFields(); | 931 const HTTPHeaderMap& newHeaders = validatingResponse.httpHeaderFields(); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 case Resource::Media: | 1109 case Resource::Media: |
1123 case Resource::Manifest: | 1110 case Resource::Manifest: |
1124 case Resource::Mock: | 1111 case Resource::Mock: |
1125 return false; | 1112 return false; |
1126 } | 1113 } |
1127 NOTREACHED(); | 1114 NOTREACHED(); |
1128 return false; | 1115 return false; |
1129 } | 1116 } |
1130 | 1117 |
1131 } // namespace blink | 1118 } // namespace blink |
OLD | NEW |