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

Side by Side Diff: third_party/WebKit/Source/platform/network/ResourceResponse.cpp

Issue 2235543002: Keep track of how many documents had a resource intercepted by foreign fetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 , m_lastModified(0.0) 91 , m_lastModified(0.0)
92 , m_hasMajorCertificateErrors(false) 92 , m_hasMajorCertificateErrors(false)
93 , m_securityStyle(SecurityStyleUnknown) 93 , m_securityStyle(SecurityStyleUnknown)
94 , m_httpVersion(HTTPVersionUnknown) 94 , m_httpVersion(HTTPVersionUnknown)
95 , m_appCacheID(0) 95 , m_appCacheID(0)
96 , m_wasFetchedViaSPDY(false) 96 , m_wasFetchedViaSPDY(false)
97 , m_wasNpnNegotiated(false) 97 , m_wasNpnNegotiated(false)
98 , m_wasAlternateProtocolAvailable(false) 98 , m_wasAlternateProtocolAvailable(false)
99 , m_wasFetchedViaProxy(false) 99 , m_wasFetchedViaProxy(false)
100 , m_wasFetchedViaServiceWorker(false) 100 , m_wasFetchedViaServiceWorker(false)
101 , m_wasFetchedViaForeignFetch(false)
101 , m_wasFallbackRequiredByServiceWorker(false) 102 , m_wasFallbackRequiredByServiceWorker(false)
102 , m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault) 103 , m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault)
103 , m_responseTime(0) 104 , m_responseTime(0)
104 , m_remotePort(0) 105 , m_remotePort(0)
105 , m_encodedBodyLength(0) 106 , m_encodedBodyLength(0)
106 , m_decodedBodyLength(0) 107 , m_decodedBodyLength(0)
107 { 108 {
108 } 109 }
109 110
110 ResourceResponse::ResourceResponse(const KURL& url, const AtomicString& mimeType , long long expectedLength, const AtomicString& textEncodingName, const String& filename) 111 ResourceResponse::ResourceResponse(const KURL& url, const AtomicString& mimeType , long long expectedLength, const AtomicString& textEncodingName, const String& filename)
(...skipping 18 matching lines...) Expand all
129 , m_lastModified(0.0) 130 , m_lastModified(0.0)
130 , m_hasMajorCertificateErrors(false) 131 , m_hasMajorCertificateErrors(false)
131 , m_securityStyle(SecurityStyleUnknown) 132 , m_securityStyle(SecurityStyleUnknown)
132 , m_httpVersion(HTTPVersionUnknown) 133 , m_httpVersion(HTTPVersionUnknown)
133 , m_appCacheID(0) 134 , m_appCacheID(0)
134 , m_wasFetchedViaSPDY(false) 135 , m_wasFetchedViaSPDY(false)
135 , m_wasNpnNegotiated(false) 136 , m_wasNpnNegotiated(false)
136 , m_wasAlternateProtocolAvailable(false) 137 , m_wasAlternateProtocolAvailable(false)
137 , m_wasFetchedViaProxy(false) 138 , m_wasFetchedViaProxy(false)
138 , m_wasFetchedViaServiceWorker(false) 139 , m_wasFetchedViaServiceWorker(false)
140 , m_wasFetchedViaForeignFetch(false)
139 , m_wasFallbackRequiredByServiceWorker(false) 141 , m_wasFallbackRequiredByServiceWorker(false)
140 , m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault) 142 , m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault)
141 , m_responseTime(0) 143 , m_responseTime(0)
142 , m_remotePort(0) 144 , m_remotePort(0)
143 , m_encodedBodyLength(0) 145 , m_encodedBodyLength(0)
144 , m_decodedBodyLength(0) 146 , m_decodedBodyLength(0)
145 { 147 {
146 } 148 }
147 149
148 ResourceResponse::ResourceResponse(CrossThreadResourceResponseData* data) 150 ResourceResponse::ResourceResponse(CrossThreadResourceResponseData* data)
(...skipping 22 matching lines...) Expand all
171 m_securityDetails.sctList = data->m_securityDetails.sctList; 173 m_securityDetails.sctList = data->m_securityDetails.sctList;
172 m_httpVersion = data->m_httpVersion; 174 m_httpVersion = data->m_httpVersion;
173 m_appCacheID = data->m_appCacheID; 175 m_appCacheID = data->m_appCacheID;
174 m_appCacheManifestURL = data->m_appCacheManifestURL.copy(); 176 m_appCacheManifestURL = data->m_appCacheManifestURL.copy();
175 m_multipartBoundary = data->m_multipartBoundary; 177 m_multipartBoundary = data->m_multipartBoundary;
176 m_wasFetchedViaSPDY = data->m_wasFetchedViaSPDY; 178 m_wasFetchedViaSPDY = data->m_wasFetchedViaSPDY;
177 m_wasNpnNegotiated = data->m_wasNpnNegotiated; 179 m_wasNpnNegotiated = data->m_wasNpnNegotiated;
178 m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvailable; 180 m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvailable;
179 m_wasFetchedViaProxy = data->m_wasFetchedViaProxy; 181 m_wasFetchedViaProxy = data->m_wasFetchedViaProxy;
180 m_wasFetchedViaServiceWorker = data->m_wasFetchedViaServiceWorker; 182 m_wasFetchedViaServiceWorker = data->m_wasFetchedViaServiceWorker;
183 m_wasFetchedViaForeignFetch = data->m_wasFetchedViaForeignFetch;
181 m_wasFallbackRequiredByServiceWorker = data->m_wasFallbackRequiredByServiceW orker; 184 m_wasFallbackRequiredByServiceWorker = data->m_wasFallbackRequiredByServiceW orker;
182 m_serviceWorkerResponseType = data->m_serviceWorkerResponseType; 185 m_serviceWorkerResponseType = data->m_serviceWorkerResponseType;
183 m_originalURLViaServiceWorker = data->m_originalURLViaServiceWorker; 186 m_originalURLViaServiceWorker = data->m_originalURLViaServiceWorker;
184 m_cacheStorageCacheName = data->m_cacheStorageCacheName; 187 m_cacheStorageCacheName = data->m_cacheStorageCacheName;
185 m_responseTime = data->m_responseTime; 188 m_responseTime = data->m_responseTime;
186 m_remoteIPAddress = AtomicString(data->m_remoteIPAddress); 189 m_remoteIPAddress = AtomicString(data->m_remoteIPAddress);
187 m_remotePort = data->m_remotePort; 190 m_remotePort = data->m_remotePort;
188 m_encodedBodyLength = data->m_encodedBodyLength; 191 m_encodedBodyLength = data->m_encodedBodyLength;
189 m_decodedBodyLength = data->m_decodedBodyLength; 192 m_decodedBodyLength = data->m_decodedBodyLength;
190 m_downloadedFilePath = data->m_downloadedFilePath; 193 m_downloadedFilePath = data->m_downloadedFilePath;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 data->m_securityDetails.sctList = isolatedCopy(m_securityDetails.sctList); 225 data->m_securityDetails.sctList = isolatedCopy(m_securityDetails.sctList);
223 data->m_httpVersion = m_httpVersion; 226 data->m_httpVersion = m_httpVersion;
224 data->m_appCacheID = m_appCacheID; 227 data->m_appCacheID = m_appCacheID;
225 data->m_appCacheManifestURL = m_appCacheManifestURL.copy(); 228 data->m_appCacheManifestURL = m_appCacheManifestURL.copy();
226 data->m_multipartBoundary = m_multipartBoundary; 229 data->m_multipartBoundary = m_multipartBoundary;
227 data->m_wasFetchedViaSPDY = m_wasFetchedViaSPDY; 230 data->m_wasFetchedViaSPDY = m_wasFetchedViaSPDY;
228 data->m_wasNpnNegotiated = m_wasNpnNegotiated; 231 data->m_wasNpnNegotiated = m_wasNpnNegotiated;
229 data->m_wasAlternateProtocolAvailable = m_wasAlternateProtocolAvailable; 232 data->m_wasAlternateProtocolAvailable = m_wasAlternateProtocolAvailable;
230 data->m_wasFetchedViaProxy = m_wasFetchedViaProxy; 233 data->m_wasFetchedViaProxy = m_wasFetchedViaProxy;
231 data->m_wasFetchedViaServiceWorker = m_wasFetchedViaServiceWorker; 234 data->m_wasFetchedViaServiceWorker = m_wasFetchedViaServiceWorker;
235 data->m_wasFetchedViaForeignFetch = m_wasFetchedViaForeignFetch;
232 data->m_wasFallbackRequiredByServiceWorker = m_wasFallbackRequiredByServiceW orker; 236 data->m_wasFallbackRequiredByServiceWorker = m_wasFallbackRequiredByServiceW orker;
233 data->m_serviceWorkerResponseType = m_serviceWorkerResponseType; 237 data->m_serviceWorkerResponseType = m_serviceWorkerResponseType;
234 data->m_originalURLViaServiceWorker = m_originalURLViaServiceWorker.copy(); 238 data->m_originalURLViaServiceWorker = m_originalURLViaServiceWorker.copy();
235 data->m_cacheStorageCacheName = cacheStorageCacheName().isolatedCopy(); 239 data->m_cacheStorageCacheName = cacheStorageCacheName().isolatedCopy();
236 data->m_responseTime = m_responseTime; 240 data->m_responseTime = m_responseTime;
237 data->m_remoteIPAddress = m_remoteIPAddress.getString().isolatedCopy(); 241 data->m_remoteIPAddress = m_remoteIPAddress.getString().isolatedCopy();
238 data->m_remotePort = m_remotePort; 242 data->m_remotePort = m_remotePort;
239 data->m_encodedBodyLength = m_encodedBodyLength; 243 data->m_encodedBodyLength = m_encodedBodyLength;
240 data->m_decodedBodyLength = m_decodedBodyLength; 244 data->m_decodedBodyLength = m_decodedBodyLength;
241 data->m_downloadedFilePath = m_downloadedFilePath.isolatedCopy(); 245 data->m_downloadedFilePath = m_downloadedFilePath.isolatedCopy();
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 if (a.resourceLoadTiming() != b.resourceLoadTiming()) 634 if (a.resourceLoadTiming() != b.resourceLoadTiming())
631 return false; 635 return false;
632 if (a.encodedBodyLength() != b.encodedBodyLength()) 636 if (a.encodedBodyLength() != b.encodedBodyLength())
633 return false; 637 return false;
634 if (a.decodedBodyLength() != b.decodedBodyLength()) 638 if (a.decodedBodyLength() != b.decodedBodyLength())
635 return false; 639 return false;
636 return true; 640 return true;
637 } 641 }
638 642
639 } // namespace blink 643 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/network/ResourceResponse.h ('k') | third_party/WebKit/public/platform/WebURLResponse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698