| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 m_identifier, passedNewRequest.toMutableResourceRequest(), | 339 m_identifier, passedNewRequest.toMutableResourceRequest(), |
| 340 passedRedirectResponse.toResourceResponse(), initiatorInfo); | 340 passedRedirectResponse.toResourceResponse(), initiatorInfo); |
| 341 } | 341 } |
| 342 | 342 |
| 343 return true; | 343 return true; |
| 344 } | 344 } |
| 345 | 345 |
| 346 void PingLoaderImpl::didReceiveResponse(const WebURLResponse& response) { | 346 void PingLoaderImpl::didReceiveResponse(const WebURLResponse& response) { |
| 347 if (frame()) { | 347 if (frame()) { |
| 348 const ResourceResponse& resourceResponse = response.toResourceResponse(); | 348 const ResourceResponse& resourceResponse = response.toResourceResponse(); |
| 349 probe::didReceiveResourceResponse(frame(), m_identifier, 0, | 349 probe::didReceiveResourceResponse(frame()->document(), m_identifier, 0, |
| 350 resourceResponse, 0); | 350 resourceResponse, 0); |
| 351 didFailLoading(frame()); | 351 didFailLoading(frame()); |
| 352 } | 352 } |
| 353 dispose(); | 353 dispose(); |
| 354 } | 354 } |
| 355 | 355 |
| 356 void PingLoaderImpl::didReceiveData(const char*, int dataLength) { | 356 void PingLoaderImpl::didReceiveData(const char*, int dataLength) { |
| 357 if (frame()) | 357 if (frame()) |
| 358 didFailLoading(frame()); | 358 didFailLoading(frame()); |
| 359 dispose(); | 359 dispose(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 375 dispose(); | 375 dispose(); |
| 376 } | 376 } |
| 377 | 377 |
| 378 void PingLoaderImpl::timeout(TimerBase*) { | 378 void PingLoaderImpl::timeout(TimerBase*) { |
| 379 if (frame()) | 379 if (frame()) |
| 380 didFailLoading(frame()); | 380 didFailLoading(frame()); |
| 381 dispose(); | 381 dispose(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 void PingLoaderImpl::didFailLoading(LocalFrame* frame) { | 384 void PingLoaderImpl::didFailLoading(LocalFrame* frame) { |
| 385 probe::didFailLoading(frame, m_identifier, | 385 probe::didFailLoading(frame->document(), m_identifier, |
| 386 ResourceError::cancelledError(m_url)); | 386 ResourceError::cancelledError(m_url)); |
| 387 frame->console().didFailLoading(m_identifier, | 387 frame->console().didFailLoading(m_identifier, |
| 388 ResourceError::cancelledError(m_url)); | 388 ResourceError::cancelledError(m_url)); |
| 389 } | 389 } |
| 390 | 390 |
| 391 DEFINE_TRACE(PingLoaderImpl) { | 391 DEFINE_TRACE(PingLoaderImpl) { |
| 392 ContextClient::trace(visitor); | 392 ContextClient::trace(visitor); |
| 393 } | 393 } |
| 394 | 394 |
| 395 void finishPingRequestInitialization( | 395 void finishPingRequestInitialization( |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 bool PingLoader::sendBeacon(LocalFrame* frame, | 580 bool PingLoader::sendBeacon(LocalFrame* frame, |
| 581 int allowance, | 581 int allowance, |
| 582 const KURL& beaconURL, | 582 const KURL& beaconURL, |
| 583 Blob* data, | 583 Blob* data, |
| 584 size_t& beaconSize) { | 584 size_t& beaconSize) { |
| 585 BeaconBlob beacon(data); | 585 BeaconBlob beacon(data); |
| 586 return sendBeaconCommon(frame, allowance, beaconURL, beacon, beaconSize); | 586 return sendBeaconCommon(frame, allowance, beaconURL, beacon, beaconSize); |
| 587 } | 587 } |
| 588 | 588 |
| 589 } // namespace blink | 589 } // namespace blink |
| OLD | NEW |