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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 } | 300 } |
301 | 301 |
302 void ResourceLoader::willSendRequest(ResourceHandle*, ResourceRequest& request,
const ResourceResponse& redirectResponse) | 302 void ResourceLoader::willSendRequest(ResourceHandle*, ResourceRequest& request,
const ResourceResponse& redirectResponse) |
303 { | 303 { |
304 // Store the previous URL because we may modify it. | 304 // Store the previous URL because we may modify it. |
305 KURL previousURL = m_request.url(); | 305 KURL previousURL = m_request.url(); |
306 RefPtr<ResourceLoader> protect(this); | 306 RefPtr<ResourceLoader> protect(this); |
307 | 307 |
308 ASSERT(!request.isNull()); | 308 ASSERT(!request.isNull()); |
309 if (!redirectResponse.isNull()) { | 309 if (!redirectResponse.isNull()) { |
310 if (!m_documentLoader->cachedResourceLoader()->canRequest(m_resource->ty
pe(), request.url())) { | 310 if (!m_documentLoader->cachedResourceLoader()->canRequest(m_resource->ty
pe(), request.url(), m_options.contentSecurityPolicyOption)) { |
311 cancel(); | 311 cancel(); |
312 return; | 312 return; |
313 } | 313 } |
314 if (m_resource->type() == CachedResource::ImageResource && m_documentLoa
der->cachedResourceLoader()->shouldDeferImageLoad(request.url())) { | 314 if (m_resource->type() == CachedResource::ImageResource && m_documentLoa
der->cachedResourceLoader()->shouldDeferImageLoad(request.url())) { |
315 cancel(); | 315 cancel(); |
316 return; | 316 return; |
317 } | 317 } |
318 m_resource->willSendRequest(request, redirectResponse); | 318 m_resource->willSendRequest(request, redirectResponse); |
319 } | 319 } |
320 | 320 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 info.addMember(m_request, "request"); | 492 info.addMember(m_request, "request"); |
493 info.addMember(m_originalRequest, "originalRequest"); | 493 info.addMember(m_originalRequest, "originalRequest"); |
494 info.addMember(m_deferredRequest, "deferredRequest"); | 494 info.addMember(m_deferredRequest, "deferredRequest"); |
495 info.addMember(m_options, "options"); | 495 info.addMember(m_options, "options"); |
496 info.addMember(m_resource, "resource"); | 496 info.addMember(m_resource, "resource"); |
497 info.addMember(m_documentLoader, "documentLoader"); | 497 info.addMember(m_documentLoader, "documentLoader"); |
498 info.addMember(m_requestCountTracker, "requestCountTracker"); | 498 info.addMember(m_requestCountTracker, "requestCountTracker"); |
499 } | 499 } |
500 | 500 |
501 } | 501 } |
OLD | NEW |