| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 ResourceRequest& new_request(passed_new_request.ToMutableResourceRequest()); | 164 ResourceRequest& new_request(passed_new_request.ToMutableResourceRequest()); |
| 165 const ResourceResponse& redirect_response( | 165 const ResourceResponse& redirect_response( |
| 166 passed_redirect_response.ToResourceResponse()); | 166 passed_redirect_response.ToResourceResponse()); |
| 167 | 167 |
| 168 new_request.SetRedirectStatus( | 168 new_request.SetRedirectStatus( |
| 169 ResourceRequest::RedirectStatus::kFollowedRedirect); | 169 ResourceRequest::RedirectStatus::kFollowedRedirect); |
| 170 | 170 |
| 171 const KURL original_url = new_request.Url(); | 171 const KURL original_url = new_request.Url(); |
| 172 | 172 |
| 173 if (!IsManualRedirectFetchRequest(resource_->GetResourceRequest())) { | 173 if (!IsManualRedirectFetchRequest(resource_->GetResourceRequest())) { |
| 174 ResourceRequestBlockedReason blocked_reason = Context().CanRequest( | 174 ResourceRequestBlockedReason blocked_reason = Context().CanFollowRedirect( |
| 175 resource_->GetType(), new_request, new_request.Url(), | 175 resource_->GetType(), new_request, new_request.Url(), |
| 176 resource_->Options(), | 176 resource_->Options(), |
| 177 /* Don't send security violation reports for unused preloads */ | 177 /* Don't send security violation reports for unused preloads */ |
| 178 (resource_->IsUnusedPreload() | 178 (resource_->IsUnusedPreload() |
| 179 ? SecurityViolationReportingPolicy::kSuppressReporting | 179 ? SecurityViolationReportingPolicy::kSuppressReporting |
| 180 : SecurityViolationReportingPolicy::kReport), | 180 : SecurityViolationReportingPolicy::kReport), |
| 181 FetchParameters::kUseDefaultOriginRestrictionForType); | 181 FetchParameters::kUseDefaultOriginRestrictionForType); |
| 182 if (blocked_reason != ResourceRequestBlockedReason::kNone) { | 182 if (blocked_reason != ResourceRequestBlockedReason::kNone) { |
| 183 CancelForRedirectAccessCheckError(new_request.Url(), blocked_reason); | 183 CancelForRedirectAccessCheckError(new_request.Url(), blocked_reason); |
| 184 return false; | 184 return false; |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 return; | 522 return; |
| 523 | 523 |
| 524 // Don't activate if cache policy is explicitly set. | 524 // Don't activate if cache policy is explicitly set. |
| 525 if (request.GetCachePolicy() != WebCachePolicy::kUseProtocolCachePolicy) | 525 if (request.GetCachePolicy() != WebCachePolicy::kUseProtocolCachePolicy) |
| 526 return; | 526 return; |
| 527 | 527 |
| 528 is_cache_aware_loading_activated_ = true; | 528 is_cache_aware_loading_activated_ = true; |
| 529 } | 529 } |
| 530 | 530 |
| 531 } // namespace blink | 531 } // namespace blink |
| OLD | NEW |