| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 | 214 |
| 215 bool crossOrigin = !SecurityOrigin::areSameSchemeHostPort( | 215 bool crossOrigin = !SecurityOrigin::areSameSchemeHostPort( |
| 216 redirectResponse.url(), newRequest.url()); | 216 redirectResponse.url(), newRequest.url()); |
| 217 m_fetcher->recordResourceTimingOnRedirect(m_resource.get(), redirectResponse, | 217 m_fetcher->recordResourceTimingOnRedirect(m_resource.get(), redirectResponse, |
| 218 crossOrigin); | 218 crossOrigin); |
| 219 | 219 |
| 220 newRequest.setAllowStoredCredentials(m_resource->options().allowCredentials == | 220 newRequest.setAllowStoredCredentials(m_resource->options().allowCredentials == |
| 221 AllowStoredCredentials); | 221 AllowStoredCredentials); |
| 222 | 222 context().prepareRequest(newRequest, |
| 223 FetchContext::RedirectType::kForRedirect); |
| 223 context().dispatchWillSendRequest(m_resource->identifier(), newRequest, | 224 context().dispatchWillSendRequest(m_resource->identifier(), newRequest, |
| 224 redirectResponse, | 225 redirectResponse, |
| 225 m_resource->options().initiatorInfo); | 226 m_resource->options().initiatorInfo); |
| 226 | 227 |
| 227 // ResourceFetcher::willFollowRedirect() may rewrite the URL to | 228 // ResourceFetcher::willFollowRedirect() may rewrite the URL to |
| 228 // something else not for rejecting redirect but for other reasons. | 229 // something else not for rejecting redirect but for other reasons. |
| 229 // E.g. WebFrameTestClient::willSendRequest() and | 230 // E.g. WebFrameTestClient::willSendRequest() and |
| 230 // RenderFrameImpl::willSendRequest(). We should reflect the | 231 // RenderFrameImpl::willSendRequest(). We should reflect the |
| 231 // rewriting but currently we cannot. So, return false to make the | 232 // rewriting but currently we cannot. So, return false to make the |
| 232 // redirect fail. | 233 // redirect fail. |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 return; | 520 return; |
| 520 | 521 |
| 521 // Don't activate if cache policy is explicitly set. | 522 // Don't activate if cache policy is explicitly set. |
| 522 if (request.getCachePolicy() != WebCachePolicy::UseProtocolCachePolicy) | 523 if (request.getCachePolicy() != WebCachePolicy::UseProtocolCachePolicy) |
| 523 return; | 524 return; |
| 524 | 525 |
| 525 m_isCacheAwareLoadingActivated = true; | 526 m_isCacheAwareLoadingActivated = true; |
| 526 } | 527 } |
| 527 | 528 |
| 528 } // namespace blink | 529 } // namespace blink |
| OLD | NEW |