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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 outgoingOrigin = document->outgoingOrigin(); | 67 outgoingOrigin = document->outgoingOrigin(); |
68 } else { | 68 } else { |
69 outgoingReferrer = request.httpReferrer(); | 69 outgoingReferrer = request.httpReferrer(); |
70 outgoingOrigin = SecurityOrigin::createFromString(outgoingReferrer)-
>toString(); | 70 outgoingOrigin = SecurityOrigin::createFromString(outgoingReferrer)-
>toString(); |
71 } | 71 } |
72 | 72 |
73 outgoingReferrer = SecurityPolicy::generateReferrerHeader(document->refe
rrerPolicy(), request.url(), outgoingReferrer); | 73 outgoingReferrer = SecurityPolicy::generateReferrerHeader(document->refe
rrerPolicy(), request.url(), outgoingReferrer); |
74 if (outgoingReferrer.isEmpty()) | 74 if (outgoingReferrer.isEmpty()) |
75 request.clearHTTPReferrer(); | 75 request.clearHTTPReferrer(); |
76 else if (!request.httpReferrer()) | 76 else if (!request.httpReferrer()) |
77 request.setHTTPReferrer(outgoingReferrer); | 77 request.setHTTPReferrer(AtomicString(outgoingReferrer)); |
78 | 78 |
79 FrameLoader::addHTTPOriginIfNeeded(request, outgoingOrigin); | 79 FrameLoader::addHTTPOriginIfNeeded(request, AtomicString(outgoingOrigin)
); |
80 } | 80 } |
81 | 81 |
82 if (isMainResource && m_frame->isMainFrame()) | 82 if (isMainResource && m_frame->isMainFrame()) |
83 request.setFirstPartyForCookies(request.url()); | 83 request.setFirstPartyForCookies(request.url()); |
84 else | 84 else |
85 request.setFirstPartyForCookies(m_frame->tree().top()->document()->first
PartyForCookies()); | 85 request.setFirstPartyForCookies(m_frame->tree().top()->document()->first
PartyForCookies()); |
86 | 86 |
87 // The remaining modifications are only necessary for HTTP and HTTPS. | 87 // The remaining modifications are only necessary for HTTP and HTTPS. |
88 if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily()) | 88 if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily()) |
89 return; | 89 return; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 if (!response.isNull()) | 200 if (!response.isNull()) |
201 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); | 201 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); |
202 | 202 |
203 if (dataLength > 0) | 203 if (dataLength > 0) |
204 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength,
0); | 204 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength,
0); |
205 | 205 |
206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); | 206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); |
207 } | 207 } |
208 | 208 |
209 } // namespace WebCore | 209 } // namespace WebCore |
OLD | NEW |