| 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 | 339 |
| 340 return true; | 340 return true; |
| 341 } | 341 } |
| 342 | 342 |
| 343 void PingLoaderImpl::didReceiveResponse(const WebURLResponse& response) { | 343 void PingLoaderImpl::didReceiveResponse(const WebURLResponse& response) { |
| 344 if (frame()) { | 344 if (frame()) { |
| 345 TRACE_EVENT1( | 345 TRACE_EVENT1( |
| 346 "devtools.timeline", "ResourceFinish", "data", | 346 "devtools.timeline", "ResourceFinish", "data", |
| 347 InspectorResourceFinishEvent::data(m_identifier, 0, true, 0, 0)); | 347 InspectorResourceFinishEvent::data(m_identifier, 0, true, 0, 0)); |
| 348 const ResourceResponse& resourceResponse = response.toResourceResponse(); | 348 const ResourceResponse& resourceResponse = response.toResourceResponse(); |
| 349 InspectorInstrumentation::didReceiveResourceResponse( | 349 probe::didReceiveResourceResponse(frame(), m_identifier, 0, |
| 350 frame(), m_identifier, 0, 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 TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data", | 358 TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data", |
| 359 InspectorResourceFinishEvent::data(m_identifier, 0, true, | 359 InspectorResourceFinishEvent::data(m_identifier, 0, true, |
| 360 dataLength, 0)); | 360 dataLength, 0)); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 391 if (frame()) { | 391 if (frame()) { |
| 392 TRACE_EVENT1( | 392 TRACE_EVENT1( |
| 393 "devtools.timeline", "ResourceFinish", "data", | 393 "devtools.timeline", "ResourceFinish", "data", |
| 394 InspectorResourceFinishEvent::data(m_identifier, 0, true, 0, 0)); | 394 InspectorResourceFinishEvent::data(m_identifier, 0, true, 0, 0)); |
| 395 didFailLoading(frame()); | 395 didFailLoading(frame()); |
| 396 } | 396 } |
| 397 dispose(); | 397 dispose(); |
| 398 } | 398 } |
| 399 | 399 |
| 400 void PingLoaderImpl::didFailLoading(LocalFrame* frame) { | 400 void PingLoaderImpl::didFailLoading(LocalFrame* frame) { |
| 401 InspectorInstrumentation::didFailLoading( | 401 probe::didFailLoading(frame, m_identifier, |
| 402 frame, m_identifier, ResourceError::cancelledError(m_url)); | 402 ResourceError::cancelledError(m_url)); |
| 403 frame->console().didFailLoading(m_identifier, | 403 frame->console().didFailLoading(m_identifier, |
| 404 ResourceError::cancelledError(m_url)); | 404 ResourceError::cancelledError(m_url)); |
| 405 } | 405 } |
| 406 | 406 |
| 407 DEFINE_TRACE(PingLoaderImpl) { | 407 DEFINE_TRACE(PingLoaderImpl) { |
| 408 ContextClient::trace(visitor); | 408 ContextClient::trace(visitor); |
| 409 } | 409 } |
| 410 | 410 |
| 411 void finishPingRequestInitialization( | 411 void finishPingRequestInitialization( |
| 412 ResourceRequest& request, | 412 ResourceRequest& request, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 bool PingLoader::sendBeacon(LocalFrame* frame, | 576 bool PingLoader::sendBeacon(LocalFrame* frame, |
| 577 int allowance, | 577 int allowance, |
| 578 const KURL& beaconURL, | 578 const KURL& beaconURL, |
| 579 Blob* data, | 579 Blob* data, |
| 580 int& payloadLength) { | 580 int& payloadLength) { |
| 581 BeaconBlob beacon(data); | 581 BeaconBlob beacon(data); |
| 582 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); | 582 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); |
| 583 } | 583 } |
| 584 | 584 |
| 585 } // namespace blink | 585 } // namespace blink |
| OLD | NEW |