| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 c->dataSent(this, bytesSent, totalBytesToBeSent); | 195 c->dataSent(this, bytesSent, totalBytesToBeSent); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void RawResource::didDownloadData(int dataLength) | 198 void RawResource::didDownloadData(int dataLength) |
| 199 { | 199 { |
| 200 ResourceClientWalker<RawResourceClient> w(m_clients); | 200 ResourceClientWalker<RawResourceClient> w(m_clients); |
| 201 while (RawResourceClient* c = w.next()) | 201 while (RawResourceClient* c = w.next()) |
| 202 c->dataDownloaded(this, dataLength); | 202 c->dataDownloaded(this, dataLength); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void RawResource::reportResourceTimingToClients(const ResourceTimingInfo& info) |
| 206 { |
| 207 ResourceClientWalker<RawResourceClient> w(m_clients); |
| 208 while (RawResourceClient* c = w.next()) |
| 209 c->didReceiveResourceTiming(this, info); |
| 210 } |
| 211 |
| 205 void RawResource::setDefersLoading(bool defers) | 212 void RawResource::setDefersLoading(bool defers) |
| 206 { | 213 { |
| 207 if (m_loader) | 214 if (m_loader) |
| 208 m_loader->setDefersLoading(defers); | 215 m_loader->setDefersLoading(defers); |
| 209 } | 216 } |
| 210 | 217 |
| 211 static bool shouldIgnoreHeaderForCacheReuse(AtomicString headerName) | 218 static bool shouldIgnoreHeaderForCacheReuse(AtomicString headerName) |
| 212 { | 219 { |
| 213 // FIXME: This list of headers that don't affect cache policy almost certain
ly isn't complete. | 220 // FIXME: This list of headers that don't affect cache policy almost certain
ly isn't complete. |
| 214 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, m_headers, ()); | 221 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, m_headers, ()); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 for (const auto& header : oldHeaders) { | 271 for (const auto& header : oldHeaders) { |
| 265 AtomicString headerName = header.key; | 272 AtomicString headerName = header.key; |
| 266 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) | 273 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) |
| 267 return false; | 274 return false; |
| 268 } | 275 } |
| 269 | 276 |
| 270 return true; | 277 return true; |
| 271 } | 278 } |
| 272 | 279 |
| 273 } // namespace blink | 280 } // namespace blink |
| OLD | NEW |