Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp

Issue 2519893002: Stop dispatching encoded-data-length on each data chunk arrival (Closed)
Patch Set: PS5 again Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
index 89b751538085166dd2f2f59339d20e06ed896149..adfa7df816fa2b15b87b4d70513a0438257b8015 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -725,7 +725,7 @@ void InspectorNetworkAgent::didReceiveResourceResponse(
// following didReceiveResponse as there will be no calls to didReceiveData
// from the network stack.
if (isNotModified && cachedResource && cachedResource->encodedSize())
- didReceiveData(frame, identifier, 0, cachedResource->encodedSize(), 0);
+ didReceiveData(frame, identifier, 0, cachedResource->encodedSize());
}
static bool isErrorStatusCode(int statusCode) {
@@ -735,8 +735,7 @@ static bool isErrorStatusCode(int statusCode) {
void InspectorNetworkAgent::didReceiveData(LocalFrame*,
unsigned long identifier,
const char* data,
- int dataLength,
- int encodedDataLength) {
+ int dataLength) {
String requestId = IdentifiersFactory::requestId(identifier);
if (data) {
@@ -751,6 +750,14 @@ void InspectorNetworkAgent::didReceiveData(LocalFrame*,
}
frontend()->dataReceived(requestId, monotonicallyIncreasingTime(), dataLength,
+ 0);
+}
+
+void InspectorNetworkAgent::didReceiveEncodedData(LocalFrame*,
+ unsigned long identifier,
+ int encodedDataLength) {
+ String requestId = IdentifiersFactory::requestId(identifier);
+ frontend()->dataReceived(requestId, monotonicallyIncreasingTime(), 0,
dgozman 2016/11/30 18:02:17 This looks bad: we first send non-zero data with z
yhirano 2016/12/01 10:33:10 |length| and |encoded_data_length| are different c
encodedDataLength);
}

Powered by Google App Engine
This is Rietveld 408576698