OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) | 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) |
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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 // Store the previous URL because we may modify it. | 239 // Store the previous URL because we may modify it. |
240 KURL previousURL = m_request.url(); | 240 KURL previousURL = m_request.url(); |
241 RefPtr<ResourceLoader> protect(this); | 241 RefPtr<ResourceLoader> protect(this); |
242 | 242 |
243 ASSERT(!request.isNull()); | 243 ASSERT(!request.isNull()); |
244 if (!redirectResponse.isNull()) { | 244 if (!redirectResponse.isNull()) { |
245 if (!m_host->shouldRequest(m_resource, request, m_options)) { | 245 if (!m_host->shouldRequest(m_resource, request, m_options)) { |
246 cancel(); | 246 cancel(); |
247 return; | 247 return; |
248 } | 248 } |
249 | 249 m_host->redirectReceived(m_resource, redirectResponse); |
250 m_resource->willSendRequest(request, redirectResponse); | 250 m_resource->willSendRequest(request, redirectResponse); |
251 } | 251 } |
252 | 252 |
253 if (request.isNull() || m_state == Terminated) | 253 if (request.isNull() || m_state == Terminated) |
254 return; | 254 return; |
255 | 255 |
256 m_host->willSendRequest(m_resource, request, redirectResponse, m_options); | 256 m_host->willSendRequest(m_resource, request, redirectResponse, m_options); |
| 257 request.setReportLoadTiming(true); |
257 m_request = request; | 258 m_request = request; |
258 | 259 |
259 if (request.isNull()) | 260 if (request.isNull()) |
260 cancel(); | 261 cancel(); |
261 } | 262 } |
262 | 263 |
263 void ResourceLoader::didReceiveCachedMetadata(ResourceHandle*, const char* data,
int length) | 264 void ResourceLoader::didReceiveCachedMetadata(ResourceHandle*, const char* data,
int length) |
264 { | 265 { |
265 ASSERT(m_state == Initialized); | 266 ASSERT(m_state == Initialized); |
266 m_resource->setSerializedCachedMetadata(data, length); | 267 m_resource->setSerializedCachedMetadata(data, length); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 375 |
375 releaseResources(); | 376 releaseResources(); |
376 } | 377 } |
377 | 378 |
378 bool ResourceLoader::isLoadedBy(ResourceLoaderHost* loader) const | 379 bool ResourceLoader::isLoadedBy(ResourceLoaderHost* loader) const |
379 { | 380 { |
380 return m_host->isLoadedBy(loader); | 381 return m_host->isLoadedBy(loader); |
381 } | 382 } |
382 | 383 |
383 } | 384 } |
OLD | NEW |