Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 2423683002: Add Blink support for showing image placeholders using range requests. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 } 925 }
926 926
927 void Resource::setCachePolicyBypassingCache() { 927 void Resource::setCachePolicyBypassingCache() {
928 m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache); 928 m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache);
929 } 929 }
930 930
931 void Resource::setLoFiStateOff() { 931 void Resource::setLoFiStateOff() {
932 m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff); 932 m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff);
933 } 933 }
934 934
935 void Resource::clearRangeRequestHeader() {
936 m_resourceRequest.clearHTTPHeaderField("range");
937 }
938
935 void Resource::revalidationSucceeded( 939 void Resource::revalidationSucceeded(
936 const ResourceResponse& validatingResponse) { 940 const ResourceResponse& validatingResponse) {
937 SECURITY_CHECK(m_redirectChain.isEmpty()); 941 SECURITY_CHECK(m_redirectChain.isEmpty());
938 SECURITY_CHECK(equalIgnoringFragmentIdentifier(validatingResponse.url(), 942 SECURITY_CHECK(equalIgnoringFragmentIdentifier(validatingResponse.url(),
939 m_response.url())); 943 m_response.url()));
940 m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming()); 944 m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming());
941 945
942 // RFC2616 10.3.5 946 // RFC2616 10.3.5
943 // Update cached headers from the 304 response 947 // Update cached headers from the 304 response
944 const HTTPHeaderMap& newHeaders = validatingResponse.httpHeaderFields(); 948 const HTTPHeaderMap& newHeaders = validatingResponse.httpHeaderFields();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 case Resource::TextTrack: 1102 case Resource::TextTrack:
1099 case Resource::Media: 1103 case Resource::Media:
1100 case Resource::Manifest: 1104 case Resource::Manifest:
1101 return false; 1105 return false;
1102 } 1106 }
1103 NOTREACHED(); 1107 NOTREACHED();
1104 return false; 1108 return false;
1105 } 1109 }
1106 1110
1107 } // namespace blink 1111 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698