| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 FetchInitiatorInfo initiator_info; | 261 FetchInitiatorInfo initiator_info; |
| 262 initiator_info.name = initiator; | 262 initiator_info.name = initiator; |
| 263 fetch_context.DispatchWillSendRequest(identifier_, request, | 263 fetch_context.DispatchWillSendRequest(identifier_, request, |
| 264 ResourceResponse(), initiator_info); | 264 ResourceResponse(), initiator_info); |
| 265 | 265 |
| 266 // Make sure the scheduler doesn't wait for the ping. | 266 // Make sure the scheduler doesn't wait for the ping. |
| 267 if (frame->FrameScheduler()) | 267 if (frame->FrameScheduler()) |
| 268 frame->FrameScheduler()->DidStopLoading(identifier_); | 268 frame->FrameScheduler()->DidStopLoading(identifier_); |
| 269 | 269 |
| 270 loader_ = WTF::WrapUnique(Platform::Current()->CreateURLLoader()); | 270 loader_ = Platform::Current()->CreateURLLoader(); |
| 271 DCHECK(loader_); | 271 DCHECK(loader_); |
| 272 WrappedResourceRequest wrapped_request(request); | 272 WrappedResourceRequest wrapped_request(request); |
| 273 wrapped_request.SetAllowStoredCredentials(credentials_allowed == | 273 wrapped_request.SetAllowStoredCredentials(credentials_allowed == |
| 274 kAllowStoredCredentials); | 274 kAllowStoredCredentials); |
| 275 loader_->LoadAsynchronously(wrapped_request, this); | 275 loader_->LoadAsynchronously(wrapped_request, this); |
| 276 | 276 |
| 277 // If the server never responds, FrameLoader won't be able to cancel this load | 277 // If the server never responds, FrameLoader won't be able to cancel this load |
| 278 // and we'll sit here waiting forever. Set a very generous timeout, just in | 278 // and we'll sit here waiting forever. Set a very generous timeout, just in |
| 279 // case. | 279 // case. |
| 280 timeout_.StartOneShot(60000, BLINK_FROM_HERE); | 280 timeout_.StartOneShot(60000, BLINK_FROM_HERE); |
| (...skipping 301 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 |