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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 } | 394 } |
395 | 395 |
396 bool sendPingCommon(LocalFrame* frame, ResourceRequest& request, const AtomicStr
ing& initiator, StoredCredentials credentialsAllowed, bool isBeacon) | 396 bool sendPingCommon(LocalFrame* frame, ResourceRequest& request, const AtomicStr
ing& initiator, StoredCredentials credentialsAllowed, bool isBeacon) |
397 { | 397 { |
398 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) | 398 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) |
399 return false; | 399 return false; |
400 | 400 |
401 // The loader keeps itself alive until it receives a response and disposes i
tself. | 401 // The loader keeps itself alive until it receives a response and disposes i
tself. |
402 PingLoaderImpl* loader = new PingLoaderImpl(frame, request, initiator, Allow
StoredCredentials, true); | 402 PingLoaderImpl* loader = new PingLoaderImpl(frame, request, initiator, Allow
StoredCredentials, true); |
403 DCHECK(loader); | 403 DCHECK(loader); |
404 ALLOW_UNUSED_LOCAL(loader); | |
405 | 404 |
406 return true; | 405 return true; |
407 } | 406 } |
408 | 407 |
409 bool sendBeaconCommon(LocalFrame* frame, int allowance, const KURL& url, const B
eacon& beacon, int& payloadLength) | 408 bool sendBeaconCommon(LocalFrame* frame, int allowance, const KURL& url, const B
eacon& beacon, int& payloadLength) |
410 { | 409 { |
411 if (!frame->document()) | 410 if (!frame->document()) |
412 return false; | 411 return false; |
413 | 412 |
414 unsigned long long entitySize = beacon.size(); | 413 unsigned long long entitySize = beacon.size(); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); | 495 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); |
497 } | 496 } |
498 | 497 |
499 bool PingLoader::sendBeacon(LocalFrame* frame, int allowance, const KURL& beacon
URL, Blob* data, int& payloadLength) | 498 bool PingLoader::sendBeacon(LocalFrame* frame, int allowance, const KURL& beacon
URL, Blob* data, int& payloadLength) |
500 { | 499 { |
501 BeaconBlob beacon(data); | 500 BeaconBlob beacon(data); |
502 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); | 501 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); |
503 } | 502 } |
504 | 503 |
505 } // namespace blink | 504 } // namespace blink |
OLD | NEW |