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

Unified Diff: third_party/WebKit/Source/core/inspector/NetworkResourcesData.h

Issue 2519893002: Stop dispatching encoded-data-length on each data chunk arrival (Closed)
Patch Set: fix 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/NetworkResourcesData.h
diff --git a/third_party/WebKit/Source/core/inspector/NetworkResourcesData.h b/third_party/WebKit/Source/core/inspector/NetworkResourcesData.h
index d516266eae314a864bf8eb1271e2342b0f677ecd..9b453f17ad3e34711e5fae315e97e28ae76cc179 100644
--- a/third_party/WebKit/Source/core/inspector/NetworkResourcesData.h
+++ b/third_party/WebKit/Source/core/inspector/NetworkResourcesData.h
@@ -159,6 +159,11 @@ class NetworkResourcesData final
void setCertificate(const Vector<AtomicString>& certificate) {
m_certificate = certificate;
}
+ int pendingEncodedDataLength() const { return m_pendingEncodedDataLength; }
+ void clearPendingEncodedDataLength() { m_pendingEncodedDataLength = 0; }
+ void addPendingEncodedDataLength(int encodedDataLength) {
+ m_pendingEncodedDataLength += encodedDataLength;
+ }
DECLARE_TRACE();
@@ -185,6 +190,7 @@ class NetworkResourcesData final
String m_mimeType;
String m_textEncodingName;
int m_rawHeaderSize;
+ int m_pendingEncodedDataLength;
RefPtr<SharedBuffer> m_buffer;
WeakMember<Resource> m_cachedResource;
@@ -226,6 +232,10 @@ class NetworkResourcesData final
const Vector<AtomicString>& certificate);
HeapVector<Member<ResourceData>> resources();
+ int getAndClearPendingEncodedDataLength(const String& requestId);
+ void addPendingEncodedDataLength(const String& requestId,
+ int encodedDataLength);
+
DECLARE_TRACE();
private:

Powered by Google App Engine
This is Rietveld 408576698