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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 { | 159 { |
160 ResourcePtr<RawResource> protect(this); | 160 ResourcePtr<RawResource> protect(this); |
161 Resource::setSerializedCachedMetadata(data, size); | 161 Resource::setSerializedCachedMetadata(data, size); |
162 ResourceClientWalker<RawResourceClient> w(m_clients); | 162 ResourceClientWalker<RawResourceClient> w(m_clients); |
163 while (RawResourceClient* c = w.next()) | 163 while (RawResourceClient* c = w.next()) |
164 c->setSerializedCachedMetadata(this, data, size); | 164 c->setSerializedCachedMetadata(this, data, size); |
165 } | 165 } |
166 | 166 |
167 void RawResource::didSendData(unsigned long long bytesSent, unsigned long long t
otalBytesToBeSent) | 167 void RawResource::didSendData(unsigned long long bytesSent, unsigned long long t
otalBytesToBeSent) |
168 { | 168 { |
| 169 ResourcePtr<RawResource> protect(this); |
169 ResourceClientWalker<RawResourceClient> w(m_clients); | 170 ResourceClientWalker<RawResourceClient> w(m_clients); |
170 while (RawResourceClient* c = w.next()) | 171 while (RawResourceClient* c = w.next()) |
171 c->dataSent(this, bytesSent, totalBytesToBeSent); | 172 c->dataSent(this, bytesSent, totalBytesToBeSent); |
172 } | 173 } |
173 | 174 |
174 void RawResource::didDownloadData(int dataLength) | 175 void RawResource::didDownloadData(int dataLength) |
175 { | 176 { |
| 177 ResourcePtr<RawResource> protect(this); |
176 ResourceClientWalker<RawResourceClient> w(m_clients); | 178 ResourceClientWalker<RawResourceClient> w(m_clients); |
177 while (RawResourceClient* c = w.next()) | 179 while (RawResourceClient* c = w.next()) |
178 c->dataDownloaded(this, dataLength); | 180 c->dataDownloaded(this, dataLength); |
179 } | 181 } |
180 | 182 |
181 void RawResource::reportResourceTimingToClients(const ResourceTimingInfo& info) | 183 void RawResource::reportResourceTimingToClients(const ResourceTimingInfo& info) |
182 { | 184 { |
183 ResourceClientWalker<RawResourceClient> w(m_clients); | 185 ResourceClientWalker<RawResourceClient> w(m_clients); |
184 while (RawResourceClient* c = w.next()) | 186 while (RawResourceClient* c = w.next()) |
185 c->didReceiveResourceTiming(this, info); | 187 c->didReceiveResourceTiming(this, info); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 for (const auto& header : oldHeaders) { | 249 for (const auto& header : oldHeaders) { |
248 AtomicString headerName = header.key; | 250 AtomicString headerName = header.key; |
249 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) | 251 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) |
250 return false; | 252 return false; |
251 } | 253 } |
252 | 254 |
253 return true; | 255 return true; |
254 } | 256 } |
255 | 257 |
256 } // namespace blink | 258 } // namespace blink |
OLD | NEW |