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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 ContextClient::trace(visitor); | 398 ContextClient::trace(visitor); |
399 } | 399 } |
400 | 400 |
401 void finishPingRequestInitialization( | 401 void finishPingRequestInitialization( |
402 ResourceRequest& request, | 402 ResourceRequest& request, |
403 LocalFrame* frame, | 403 LocalFrame* frame, |
404 WebURLRequest::RequestContext requestContext) { | 404 WebURLRequest::RequestContext requestContext) { |
405 request.setRequestContext(requestContext); | 405 request.setRequestContext(requestContext); |
406 FetchContext& fetchContext = frame->document()->fetcher()->context(); | 406 FetchContext& fetchContext = frame->document()->fetcher()->context(); |
407 fetchContext.addAdditionalRequestHeaders(request, FetchSubresource); | 407 fetchContext.addAdditionalRequestHeaders(request, FetchSubresource); |
408 fetchContext.populateRequestData(request); | 408 // TODO(tyoshino): Call populateResourceRequest() if appropriate. |
| 409 fetchContext.setFirstPartyCookieAndRequestorOrigin(request); |
409 } | 410 } |
410 | 411 |
411 bool sendPingCommon(LocalFrame* frame, | 412 bool sendPingCommon(LocalFrame* frame, |
412 ResourceRequest& request, | 413 ResourceRequest& request, |
413 const AtomicString& initiator, | 414 const AtomicString& initiator, |
414 StoredCredentials credentialsAllowed, | 415 StoredCredentials credentialsAllowed, |
415 bool isBeacon) { | 416 bool isBeacon) { |
416 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) | 417 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) |
417 return false; | 418 return false; |
418 | 419 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 bool PingLoader::sendBeacon(LocalFrame* frame, | 561 bool PingLoader::sendBeacon(LocalFrame* frame, |
561 int allowance, | 562 int allowance, |
562 const KURL& beaconURL, | 563 const KURL& beaconURL, |
563 Blob* data, | 564 Blob* data, |
564 int& payloadLength) { | 565 int& payloadLength) { |
565 BeaconBlob beacon(data); | 566 BeaconBlob beacon(data); |
566 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); | 567 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); |
567 } | 568 } |
568 | 569 |
569 } // namespace blink | 570 } // namespace blink |
OLD | NEW |