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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 ASSERT(!request.isNull()); | 324 ASSERT(!request.isNull()); |
325 if (!redirectResponse.isNull()) { | 325 if (!redirectResponse.isNull()) { |
326 if (!m_documentLoader->cachedResourceLoader()->canRequest(m_resource->ty
pe(), request.url())) { | 326 if (!m_documentLoader->cachedResourceLoader()->canRequest(m_resource->ty
pe(), request.url())) { |
327 cancel(); | 327 cancel(); |
328 return; | 328 return; |
329 } | 329 } |
330 if (m_resource->type() == CachedResource::ImageResource && m_documentLoa
der->cachedResourceLoader()->shouldDeferImageLoad(request.url())) { | 330 if (m_resource->type() == CachedResource::ImageResource && m_documentLoa
der->cachedResourceLoader()->shouldDeferImageLoad(request.url())) { |
331 cancel(); | 331 cancel(); |
332 return; | 332 return; |
333 } | 333 } |
| 334 m_documentLoader->cachedResourceLoader()->redirectReceived(m_resource, r
edirectResponse); |
334 m_resource->willSendRequest(request, redirectResponse); | 335 m_resource->willSendRequest(request, redirectResponse); |
335 } | 336 } |
336 | 337 |
337 if (request.isNull() || reachedTerminalState()) | 338 if (request.isNull() || reachedTerminalState()) |
338 return; | 339 return; |
339 | 340 |
340 // We need a resource identifier for all requests, even if FrameLoader is ne
ver going to see it (such as with CORS preflight requests). | 341 // We need a resource identifier for all requests, even if FrameLoader is ne
ver going to see it (such as with CORS preflight requests). |
341 bool createdResourceIdentifier = false; | 342 bool createdResourceIdentifier = false; |
342 if (!m_identifier) { | 343 if (!m_identifier) { |
343 m_identifier = m_frame->page()->progress()->createUniqueIdentifier(); | 344 m_identifier = m_frame->page()->progress()->createUniqueIdentifier(); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 info.addMember(m_request, "request"); | 540 info.addMember(m_request, "request"); |
540 info.addMember(m_originalRequest, "originalRequest"); | 541 info.addMember(m_originalRequest, "originalRequest"); |
541 info.addMember(m_deferredRequest, "deferredRequest"); | 542 info.addMember(m_deferredRequest, "deferredRequest"); |
542 info.addMember(m_options, "options"); | 543 info.addMember(m_options, "options"); |
543 info.addMember(m_resource, "resource"); | 544 info.addMember(m_resource, "resource"); |
544 info.addMember(m_documentLoader, "documentLoader"); | 545 info.addMember(m_documentLoader, "documentLoader"); |
545 info.addMember(m_requestCountTracker, "requestCountTracker"); | 546 info.addMember(m_requestCountTracker, "requestCountTracker"); |
546 } | 547 } |
547 | 548 |
548 } | 549 } |
OLD | NEW |