OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 377 |
378 if (data) { | 378 if (data) { |
379 NetworkResourcesData::ResourceData const* resourceData = m_resourcesData
->data(requestId); | 379 NetworkResourcesData::ResourceData const* resourceData = m_resourcesData
->data(requestId); |
380 if (resourceData && !m_loadingXHRSynchronously && (!resourceData->cached
Resource() || resourceData->cachedResource()->dataBufferingPolicy() == DoNotBuff
erData || isErrorStatusCode(resourceData->httpStatusCode()))) | 380 if (resourceData && !m_loadingXHRSynchronously && (!resourceData->cached
Resource() || resourceData->cachedResource()->dataBufferingPolicy() == DoNotBuff
erData || isErrorStatusCode(resourceData->httpStatusCode()))) |
381 m_resourcesData->maybeAddResourceData(requestId, data, dataLength); | 381 m_resourcesData->maybeAddResourceData(requestId, data, dataLength); |
382 } | 382 } |
383 | 383 |
384 m_frontend->dataReceived(requestId, currentTime(), dataLength, encodedDataLe
ngth); | 384 m_frontend->dataReceived(requestId, currentTime(), dataLength, encodedDataLe
ngth); |
385 } | 385 } |
386 | 386 |
| 387 void InspectorResourceAgent::didReceiveDataWithoutData(unsigned long identifier,
int dataLength, int encodedDataLength) |
| 388 { |
| 389 String requestId = IdentifiersFactory::requestId(identifier); |
| 390 m_frontend->dataReceived(requestId, currentTime(), dataLength, encodedDataLe
ngth); |
| 391 } |
| 392 |
387 void InspectorResourceAgent::didFinishLoading(unsigned long identifier, Document
Loader* loader, double monotonicFinishTime) | 393 void InspectorResourceAgent::didFinishLoading(unsigned long identifier, Document
Loader* loader, double monotonicFinishTime) |
388 { | 394 { |
389 double finishTime = 0.0; | 395 double finishTime = 0.0; |
390 // FIXME: Expose all of the timing details to inspector and have it calculat
e finishTime. | 396 // FIXME: Expose all of the timing details to inspector and have it calculat
e finishTime. |
391 if (monotonicFinishTime) | 397 if (monotonicFinishTime) |
392 finishTime = loader->timing()->monotonicTimeToPseudoWallTime(monotonicFi
nishTime); | 398 finishTime = loader->timing()->monotonicTimeToPseudoWallTime(monotonicFi
nishTime); |
393 | 399 |
394 String requestId = IdentifiersFactory::requestId(identifier); | 400 String requestId = IdentifiersFactory::requestId(identifier); |
395 m_resourcesData->maybeDecodeDataToContent(requestId); | 401 m_resourcesData->maybeDecodeDataToContent(requestId); |
396 if (!finishTime) | 402 if (!finishTime) |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 , m_overlay(overlay) | 789 , m_overlay(overlay) |
784 , m_frontend(0) | 790 , m_frontend(0) |
785 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 791 , m_resourcesData(adoptPtr(new NetworkResourcesData())) |
786 , m_loadingXHRSynchronously(false) | 792 , m_loadingXHRSynchronously(false) |
787 , m_isRecalculatingStyle(false) | 793 , m_isRecalculatingStyle(false) |
788 { | 794 { |
789 } | 795 } |
790 | 796 |
791 } // namespace WebCore | 797 } // namespace WebCore |
792 | 798 |
OLD | NEW |