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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 FetchInitiatorInfo initiator_info; | 267 FetchInitiatorInfo initiator_info; |
268 initiator_info.name = initiator; | 268 initiator_info.name = initiator; |
269 fetch_context.DispatchWillSendRequest(identifier_, request, | 269 fetch_context.DispatchWillSendRequest(identifier_, request, |
270 ResourceResponse(), initiator_info); | 270 ResourceResponse(), initiator_info); |
271 | 271 |
272 // Make sure the scheduler doesn't wait for the ping. | 272 // Make sure the scheduler doesn't wait for the ping. |
273 if (frame->FrameScheduler()) | 273 if (frame->FrameScheduler()) |
274 frame->FrameScheduler()->DidStopLoading(identifier_); | 274 frame->FrameScheduler()->DidStopLoading(identifier_); |
275 | 275 |
276 loader_ = Platform::Current()->CreateURLLoader(); | 276 loader_ = fetch_context.CreateURLLoader(); |
277 DCHECK(loader_); | 277 DCHECK(loader_); |
278 WrappedResourceRequest wrapped_request(request); | 278 WrappedResourceRequest wrapped_request(request); |
279 wrapped_request.SetAllowStoredCredentials(credentials_allowed == | 279 wrapped_request.SetAllowStoredCredentials(credentials_allowed == |
280 kAllowStoredCredentials); | 280 kAllowStoredCredentials); |
281 loader_->LoadAsynchronously(wrapped_request, this); | 281 loader_->LoadAsynchronously(wrapped_request, this); |
282 | 282 |
283 // If the server never responds, FrameLoader won't be able to cancel this load | 283 // If the server never responds, FrameLoader won't be able to cancel this load |
284 // and we'll sit here waiting forever. Set a very generous timeout, just in | 284 // and we'll sit here waiting forever. Set a very generous timeout, just in |
285 // case. | 285 // case. |
286 timeout_.StartOneShot(60000, BLINK_FROM_HERE); | 286 timeout_.StartOneShot(60000, BLINK_FROM_HERE); |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 bool PingLoader::SendBeacon(LocalFrame* frame, | 590 bool PingLoader::SendBeacon(LocalFrame* frame, |
591 int allowance, | 591 int allowance, |
592 const KURL& beacon_url, | 592 const KURL& beacon_url, |
593 Blob* data, | 593 Blob* data, |
594 size_t& beacon_size) { | 594 size_t& beacon_size) { |
595 BeaconBlob beacon(data); | 595 BeaconBlob beacon(data); |
596 return SendBeaconCommon(frame, allowance, beacon_url, beacon, beacon_size); | 596 return SendBeaconCommon(frame, allowance, beacon_url, beacon, beacon_size); |
597 } | 597 } |
598 | 598 |
599 } // namespace blink | 599 } // namespace blink |
OLD | NEW |