| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 FetchResourceType type) { | 234 FetchResourceType type) { |
| 235 bool isMainResource = type == FetchMainResource; | 235 bool isMainResource = type == FetchMainResource; |
| 236 if (!isMainResource) { | 236 if (!isMainResource) { |
| 237 if (!request.didSetHTTPReferrer()) { | 237 if (!request.didSetHTTPReferrer()) { |
| 238 DCHECK(m_document); | 238 DCHECK(m_document); |
| 239 request.setHTTPReferrer(SecurityPolicy::generateReferrer( | 239 request.setHTTPReferrer(SecurityPolicy::generateReferrer( |
| 240 m_document->getReferrerPolicy(), request.url(), | 240 m_document->getReferrerPolicy(), request.url(), |
| 241 m_document->outgoingReferrer())); | 241 m_document->outgoingReferrer())); |
| 242 request.addHTTPOriginIfNeeded(m_document->getSecurityOrigin()); | 242 request.addHTTPOriginIfNeeded(m_document->getSecurityOrigin()); |
| 243 } else { | 243 } else { |
| 244 CHECK_EQ(SecurityPolicy::generateReferrer(request.getReferrerPolicy(), | 244 DCHECK_EQ(SecurityPolicy::generateReferrer(request.getReferrerPolicy(), |
| 245 request.url(), | 245 request.url(), |
| 246 request.httpReferrer()) | 246 request.httpReferrer()) |
| 247 .referrer, | 247 .referrer, |
| 248 request.httpReferrer()); | 248 request.httpReferrer()); |
| 249 request.addHTTPOriginIfNeeded(request.httpReferrer()); | 249 request.addHTTPOriginIfNeeded(request.httpReferrer()); |
| 250 } | 250 } |
| 251 } | 251 } |
| 252 | 252 |
| 253 if (m_document) { | 253 if (m_document) { |
| 254 request.setExternalRequestStateFromRequestorAddressSpace( | 254 request.setExternalRequestStateFromRequestorAddressSpace( |
| 255 m_document->addressSpace()); | 255 m_document->addressSpace()); |
| 256 } | 256 } |
| 257 | 257 |
| 258 // The remaining modifications are only necessary for HTTP and HTTPS. | 258 // The remaining modifications are only necessary for HTTP and HTTPS. |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 response); | 1057 response); |
| 1058 } | 1058 } |
| 1059 | 1059 |
| 1060 DEFINE_TRACE(FrameFetchContext) { | 1060 DEFINE_TRACE(FrameFetchContext) { |
| 1061 visitor->trace(m_document); | 1061 visitor->trace(m_document); |
| 1062 visitor->trace(m_documentLoader); | 1062 visitor->trace(m_documentLoader); |
| 1063 FetchContext::trace(visitor); | 1063 FetchContext::trace(visitor); |
| 1064 } | 1064 } |
| 1065 | 1065 |
| 1066 } // namespace blink | 1066 } // namespace blink |
| OLD | NEW |