OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 visitor->trace(m_frame); | 390 visitor->trace(m_frame); |
391 } | 391 } |
392 | 392 |
393 void finishPingRequestInitialization( | 393 void finishPingRequestInitialization( |
394 ResourceRequest& request, | 394 ResourceRequest& request, |
395 LocalFrame* frame, | 395 LocalFrame* frame, |
396 WebURLRequest::RequestContext requestContext) { | 396 WebURLRequest::RequestContext requestContext) { |
397 request.setRequestContext(requestContext); | 397 request.setRequestContext(requestContext); |
398 FetchContext& fetchContext = frame->document()->fetcher()->context(); | 398 FetchContext& fetchContext = frame->document()->fetcher()->context(); |
399 fetchContext.addAdditionalRequestHeaders(request, FetchSubresource); | 399 fetchContext.addAdditionalRequestHeaders(request, FetchSubresource); |
400 fetchContext.populateRequestData(request); | 400 // TODO(tyoshino): Call populateResourceRequest() if appropriate. |
| 401 fetchContext.setFirstPartyCookieAndRequestorOrigin(request); |
401 } | 402 } |
402 | 403 |
403 bool sendPingCommon(LocalFrame* frame, | 404 bool sendPingCommon(LocalFrame* frame, |
404 ResourceRequest& request, | 405 ResourceRequest& request, |
405 const AtomicString& initiator, | 406 const AtomicString& initiator, |
406 StoredCredentials credentialsAllowed, | 407 StoredCredentials credentialsAllowed, |
407 bool isBeacon) { | 408 bool isBeacon) { |
408 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) | 409 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) |
409 return false; | 410 return false; |
410 | 411 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 bool PingLoader::sendBeacon(LocalFrame* frame, | 553 bool PingLoader::sendBeacon(LocalFrame* frame, |
553 int allowance, | 554 int allowance, |
554 const KURL& beaconURL, | 555 const KURL& beaconURL, |
555 Blob* data, | 556 Blob* data, |
556 int& payloadLength) { | 557 int& payloadLength) { |
557 BeaconBlob beacon(data); | 558 BeaconBlob beacon(data); |
558 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); | 559 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); |
559 } | 560 } |
560 | 561 |
561 } // namespace blink | 562 } // namespace blink |
OLD | NEW |