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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 RefPtr<SecurityOrigin> outgoingOrigin; | 185 RefPtr<SecurityOrigin> outgoingOrigin; |
186 if (!request.didSetHTTPReferrer()) { | 186 if (!request.didSetHTTPReferrer()) { |
187 ASSERT(m_document); | 187 ASSERT(m_document); |
188 outgoingOrigin = m_document->getSecurityOrigin(); | 188 outgoingOrigin = m_document->getSecurityOrigin(); |
189 request.setHTTPReferrer(SecurityPolicy::generateReferrer(m_document-
>getReferrerPolicy(), request.url(), m_document->outgoingReferrer())); | 189 request.setHTTPReferrer(SecurityPolicy::generateReferrer(m_document-
>getReferrerPolicy(), request.url(), m_document->outgoingReferrer())); |
190 } else { | 190 } else { |
191 RELEASE_ASSERT(SecurityPolicy::generateReferrer(request.getReferrerP
olicy(), request.url(), request.httpReferrer()).referrer == request.httpReferrer
()); | 191 RELEASE_ASSERT(SecurityPolicy::generateReferrer(request.getReferrerP
olicy(), request.url(), request.httpReferrer()).referrer == request.httpReferrer
()); |
192 outgoingOrigin = SecurityOrigin::createFromString(request.httpReferr
er()); | 192 outgoingOrigin = SecurityOrigin::createFromString(request.httpReferr
er()); |
193 } | 193 } |
194 | 194 |
195 request.addHTTPOriginIfNeeded(outgoingOrigin); | 195 request.addHTTPOriginIfNeeded(outgoingOrigin.get()); |
196 } | 196 } |
197 | 197 |
198 if (m_document) | 198 if (m_document) |
199 request.setExternalRequestStateFromRequestorAddressSpace(m_document->add
ressSpace()); | 199 request.setExternalRequestStateFromRequestorAddressSpace(m_document->add
ressSpace()); |
200 | 200 |
201 // The remaining modifications are only necessary for HTTP and HTTPS. | 201 // The remaining modifications are only necessary for HTTP and HTTPS. |
202 if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily()) | 202 if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily()) |
203 return; | 203 return; |
204 | 204 |
205 if (frame()->loader().loadType() == FrameLoadTypeReload) | 205 if (frame()->loader().loadType() == FrameLoadTypeReload) |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 } | 835 } |
836 | 836 |
837 DEFINE_TRACE(FrameFetchContext) | 837 DEFINE_TRACE(FrameFetchContext) |
838 { | 838 { |
839 visitor->trace(m_document); | 839 visitor->trace(m_document); |
840 visitor->trace(m_documentLoader); | 840 visitor->trace(m_documentLoader); |
841 FetchContext::trace(visitor); | 841 FetchContext::trace(visitor); |
842 } | 842 } |
843 | 843 |
844 } // namespace blink | 844 } // namespace blink |
OLD | NEW |