| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 { | 744 { |
| 745 appendRecord(TimelineRecordFactory::createScheduleResourceRequestData(url),
TimelineRecordType::ScheduleResourceRequest, true, document->frame()); | 745 appendRecord(TimelineRecordFactory::createScheduleResourceRequestData(url),
TimelineRecordType::ScheduleResourceRequest, true, document->frame()); |
| 746 } | 746 } |
| 747 | 747 |
| 748 void InspectorTimelineAgent::willSendRequest(unsigned long identifier, DocumentL
oader* loader, const ResourceRequest& request, const ResourceResponse&, const Fe
tchInitiatorInfo&) | 748 void InspectorTimelineAgent::willSendRequest(unsigned long identifier, DocumentL
oader* loader, const ResourceRequest& request, const ResourceResponse&, const Fe
tchInitiatorInfo&) |
| 749 { | 749 { |
| 750 String requestId = IdentifiersFactory::requestId(identifier); | 750 String requestId = IdentifiersFactory::requestId(identifier); |
| 751 appendRecord(TimelineRecordFactory::createResourceSendRequestData(requestId,
request), TimelineRecordType::ResourceSendRequest, true, loader->frame()); | 751 appendRecord(TimelineRecordFactory::createResourceSendRequestData(requestId,
request), TimelineRecordType::ResourceSendRequest, true, loader->frame()); |
| 752 } | 752 } |
| 753 | 753 |
| 754 bool InspectorTimelineAgent::willReceiveResourceData(LocalFrame* frame, unsigned
long identifier, int length) | 754 void InspectorTimelineAgent::didReceiveData(LocalFrame* frame, unsigned long ide
ntifier, const char*, int, int encodedDataLength) |
| 755 { | 755 { |
| 756 String requestId = IdentifiersFactory::requestId(identifier); | 756 String requestId = IdentifiersFactory::requestId(identifier); |
| 757 pushCurrentRecord(TimelineRecordFactory::createReceiveResourceData(requestId
, length), TimelineRecordType::ResourceReceivedData, false, frame); | 757 appendRecord(TimelineRecordFactory::createReceiveResourceData(requestId, enc
odedDataLength), TimelineRecordType::ResourceReceivedData, false, frame); |
| 758 return true; | |
| 759 } | |
| 760 | |
| 761 void InspectorTimelineAgent::didReceiveResourceData() | |
| 762 { | |
| 763 didCompleteCurrentRecord(TimelineRecordType::ResourceReceivedData); | |
| 764 } | 758 } |
| 765 | 759 |
| 766 void InspectorTimelineAgent::didReceiveResourceResponse(LocalFrame* frame, unsig
ned long identifier, DocumentLoader* loader, const ResourceResponse& response, R
esourceLoader* resourceLoader) | 760 void InspectorTimelineAgent::didReceiveResourceResponse(LocalFrame* frame, unsig
ned long identifier, DocumentLoader* loader, const ResourceResponse& response, R
esourceLoader* resourceLoader) |
| 767 { | 761 { |
| 768 String requestId = IdentifiersFactory::requestId(identifier); | 762 String requestId = IdentifiersFactory::requestId(identifier); |
| 769 appendRecord(TimelineRecordFactory::createResourceReceiveResponseData(reques
tId, response), TimelineRecordType::ResourceReceiveResponse, false, 0); | 763 appendRecord(TimelineRecordFactory::createResourceReceiveResponseData(reques
tId, response), TimelineRecordType::ResourceReceiveResponse, false, 0); |
| 770 } | 764 } |
| 771 | 765 |
| 772 void InspectorTimelineAgent::didFinishLoadingResource(unsigned long identifier,
bool didFail, double finishTime) | 766 void InspectorTimelineAgent::didFinishLoadingResource(unsigned long identifier,
bool didFail, double finishTime) |
| 773 { | 767 { |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1338 | 1332 |
| 1339 #ifndef NDEBUG | 1333 #ifndef NDEBUG |
| 1340 bool TimelineRecordStack::isOpenRecordOfType(const String& type) | 1334 bool TimelineRecordStack::isOpenRecordOfType(const String& type) |
| 1341 { | 1335 { |
| 1342 return !m_stack.isEmpty() && m_stack.last().type == type; | 1336 return !m_stack.isEmpty() && m_stack.last().type == type; |
| 1343 } | 1337 } |
| 1344 #endif | 1338 #endif |
| 1345 | 1339 |
| 1346 } // namespace WebCore | 1340 } // namespace WebCore |
| 1347 | 1341 |
| OLD | NEW |