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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 m_corsMode(IsCORSEnabled) { | 242 m_corsMode(IsCORSEnabled) { |
243 const AtomicString contentType = request.httpContentType(); | 243 const AtomicString contentType = request.httpContentType(); |
244 if (!contentType.isNull() && | 244 if (!contentType.isNull() && |
245 FetchUtils::isSimpleHeader(AtomicString("content-type"), contentType)) | 245 FetchUtils::isSimpleHeader(AtomicString("content-type"), contentType)) |
246 m_corsMode = NotCORSEnabled; | 246 m_corsMode = NotCORSEnabled; |
247 | 247 |
248 frame->loader().client()->didDispatchPingLoader(request.url()); | 248 frame->loader().client()->didDispatchPingLoader(request.url()); |
249 | 249 |
250 FetchContext& fetchContext = frame->document()->fetcher()->context(); | 250 FetchContext& fetchContext = frame->document()->fetcher()->context(); |
251 | 251 |
252 fetchContext.willStartLoadingResource(m_identifier, request, Resource::Image); | 252 fetchContext.willStartLoadingResource(m_identifier, request, Resource::Image, |
| 253 initiator, false); |
253 | 254 |
254 FetchInitiatorInfo initiatorInfo; | 255 FetchInitiatorInfo initiatorInfo; |
255 initiatorInfo.name = initiator; | 256 initiatorInfo.name = initiator; |
256 fetchContext.dispatchWillSendRequest(m_identifier, request, | 257 fetchContext.dispatchWillSendRequest(m_identifier, request, |
257 ResourceResponse(), initiatorInfo); | 258 ResourceResponse(), initiatorInfo); |
258 | 259 |
259 // Make sure the scheduler doesn't wait for the ping. | 260 // Make sure the scheduler doesn't wait for the ping. |
260 if (frame->frameScheduler()) | 261 if (frame->frameScheduler()) |
261 frame->frameScheduler()->didStopLoading(m_identifier); | 262 frame->frameScheduler()->didStopLoading(m_identifier); |
262 | 263 |
(...skipping 289 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 |