| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 m_corsMode(IsCORSEnabled) { | 246 m_corsMode(IsCORSEnabled) { |
| 247 const AtomicString contentType = request.httpContentType(); | 247 const AtomicString contentType = request.httpContentType(); |
| 248 if (!contentType.isNull() && | 248 if (!contentType.isNull() && |
| 249 FetchUtils::isSimpleHeader(AtomicString("content-type"), contentType)) | 249 FetchUtils::isSimpleHeader(AtomicString("content-type"), contentType)) |
| 250 m_corsMode = NotCORSEnabled; | 250 m_corsMode = NotCORSEnabled; |
| 251 | 251 |
| 252 frame->loader().client()->didDispatchPingLoader(request.url()); | 252 frame->loader().client()->didDispatchPingLoader(request.url()); |
| 253 | 253 |
| 254 FetchContext& fetchContext = frame->document()->fetcher()->context(); | 254 FetchContext& fetchContext = frame->document()->fetcher()->context(); |
| 255 | 255 |
| 256 fetchContext.willStartLoadingResource(m_identifier, request, Resource::Image, | 256 fetchContext.willStartLoadingResource( |
| 257 initiator, false); | 257 m_identifier, request, Resource::Image, initiator, |
| 258 FetchContext::V8ActivityLoggingPolicy::Log); |
| 258 | 259 |
| 259 FetchInitiatorInfo initiatorInfo; | 260 FetchInitiatorInfo initiatorInfo; |
| 260 initiatorInfo.name = initiator; | 261 initiatorInfo.name = initiator; |
| 261 fetchContext.dispatchWillSendRequest(m_identifier, request, | 262 fetchContext.dispatchWillSendRequest(m_identifier, request, |
| 262 ResourceResponse(), initiatorInfo); | 263 ResourceResponse(), initiatorInfo); |
| 263 | 264 |
| 264 // Make sure the scheduler doesn't wait for the ping. | 265 // Make sure the scheduler doesn't wait for the ping. |
| 265 if (frame->frameScheduler()) | 266 if (frame->frameScheduler()) |
| 266 frame->frameScheduler()->didStopLoading(m_identifier); | 267 frame->frameScheduler()->didStopLoading(m_identifier); |
| 267 | 268 |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 bool PingLoader::sendBeacon(LocalFrame* frame, | 569 bool PingLoader::sendBeacon(LocalFrame* frame, |
| 569 int allowance, | 570 int allowance, |
| 570 const KURL& beaconURL, | 571 const KURL& beaconURL, |
| 571 Blob* data, | 572 Blob* data, |
| 572 int& payloadLength) { | 573 int& payloadLength) { |
| 573 BeaconBlob beacon(data); | 574 BeaconBlob beacon(data); |
| 574 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); | 575 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); |
| 575 } | 576 } |
| 576 | 577 |
| 577 } // namespace blink | 578 } // namespace blink |
| OLD | NEW |