| 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 beacon.Serialize(request); | 465 beacon.Serialize(request); |
| 466 | 466 |
| 467 return SendPingCommon(frame, request, FetchInitiatorTypeNames::beacon, | 467 return SendPingCommon(frame, request, FetchInitiatorTypeNames::beacon, |
| 468 kAllowStoredCredentials, true); | 468 kAllowStoredCredentials, true); |
| 469 } | 469 } |
| 470 | 470 |
| 471 } // namespace | 471 } // namespace |
| 472 | 472 |
| 473 void PingLoader::LoadImage(LocalFrame* frame, const KURL& url) { | 473 void PingLoader::LoadImage(LocalFrame* frame, const KURL& url) { |
| 474 if (!frame->GetDocument()->GetSecurityOrigin()->CanDisplay(url)) { | 474 if (!frame->GetDocument()->GetSecurityOrigin()->CanDisplay(url)) { |
| 475 FrameLoader::ReportLocalLoadFailed(frame, url.GetString()); | 475 frame->GetDocument()->ReportLocalLoadFailed(url.GetString()); |
| 476 return; | 476 return; |
| 477 } | 477 } |
| 478 | 478 |
| 479 ResourceRequest request(url); | 479 ResourceRequest request(url); |
| 480 request.SetHTTPHeaderField(HTTPNames::Cache_Control, "max-age=0"); | 480 request.SetHTTPHeaderField(HTTPNames::Cache_Control, "max-age=0"); |
| 481 FinishPingRequestInitialization(request, frame, | 481 FinishPingRequestInitialization(request, frame, |
| 482 WebURLRequest::kRequestContextPing); | 482 WebURLRequest::kRequestContextPing); |
| 483 | 483 |
| 484 SendPingCommon(frame, request, FetchInitiatorTypeNames::ping, | 484 SendPingCommon(frame, request, FetchInitiatorTypeNames::ping, |
| 485 kAllowStoredCredentials, false); | 485 kAllowStoredCredentials, false); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 bool PingLoader::SendBeacon(LocalFrame* frame, | 582 bool PingLoader::SendBeacon(LocalFrame* frame, |
| 583 int allowance, | 583 int allowance, |
| 584 const KURL& beacon_url, | 584 const KURL& beacon_url, |
| 585 Blob* data, | 585 Blob* data, |
| 586 size_t& beacon_size) { | 586 size_t& beacon_size) { |
| 587 BeaconBlob beacon(data); | 587 BeaconBlob beacon(data); |
| 588 return SendBeaconCommon(frame, allowance, beacon_url, beacon, beacon_size); | 588 return SendBeaconCommon(frame, allowance, beacon_url, beacon, beacon_size); |
| 589 } | 589 } |
| 590 | 590 |
| 591 } // namespace blink | 591 } // namespace blink |
| OLD | NEW |