Drop ResourceResponseBase::connectionID and connectionReused members
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jan 2015 03:23:54 +0000 (03:23 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jan 2015 03:23:54 +0000 (03:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140158

Reviewed by Sam Weinig.

Drop ResourceResponseBase::connectionID and connectionReused members.
Those were needed by the Chromium port but are no longer used.

Source/JavaScriptCore:

* inspector/protocol/Network.json:

Source/WebCore:

* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
* page/PerformanceResourceTiming.h:
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::connectStart):
(WebCore::PerformanceTiming::connectEnd):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::connectionReused): Deleted.
(WebCore::ResourceResponseBase::setConnectionReused): Deleted.
(WebCore::ResourceResponseBase::connectionID): Deleted.
(WebCore::ResourceResponseBase::setConnectionID): Deleted.
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::encode):
(WebCore::ResourceResponseBase::decode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178019 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/protocol/Network.json
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/page/PerformanceResourceTiming.cpp
Source/WebCore/page/PerformanceResourceTiming.h
Source/WebCore/page/PerformanceTiming.cpp
Source/WebCore/platform/network/ResourceResponseBase.cpp
Source/WebCore/platform/network/ResourceResponseBase.h

index 91945b5..70d2a5a 100644 (file)
@@ -1,3 +1,15 @@
+2015-01-06  Chris Dumez  <cdumez@apple.com>
+
+        Drop ResourceResponseBase::connectionID and connectionReused members
+        https://bugs.webkit.org/show_bug.cgi?id=140158
+
+        Reviewed by Sam Weinig.
+
+        Drop ResourceResponseBase::connectionID and connectionReused members.
+        Those were needed by the Chromium port but are no longer used.
+
+        * inspector/protocol/Network.json:
+
 2015-01-06  Mark Lam  <mark.lam@apple.com>
 
         Add the lexicalEnvironment as an operand to op_create_arguments.
index d9f0ef1..e0a539c 100644 (file)
@@ -67,8 +67,6 @@
                 { "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." },
                 { "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." },
                 { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text." },
-                { "name": "connectionReused", "type": "boolean", "description": "Specifies whether physical connection was actually reused for this request." },
-                { "name": "connectionId", "type": "number", "description": "Physical connection id that was actually used for this request." },
                 { "name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the disk cache." },
                 { "name": "timing", "$ref": "ResourceTiming", "optional": true, "description": "Timing information for the given request." }
             ]
index b0ee4b0..b80bc2a 100644 (file)
@@ -1,5 +1,35 @@
 2015-01-06  Chris Dumez  <cdumez@apple.com>
 
+        Drop ResourceResponseBase::connectionID and connectionReused members
+        https://bugs.webkit.org/show_bug.cgi?id=140158
+
+        Reviewed by Sam Weinig.
+
+        Drop ResourceResponseBase::connectionID and connectionReused members.
+        Those were needed by the Chromium port but are no longer used.
+
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::buildObjectForResourceResponse):
+        * page/PerformanceResourceTiming.cpp:
+        (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
+        (WebCore::PerformanceResourceTiming::connectStart):
+        (WebCore::PerformanceResourceTiming::connectEnd):
+        * page/PerformanceResourceTiming.h:
+        * page/PerformanceTiming.cpp:
+        (WebCore::PerformanceTiming::connectStart):
+        (WebCore::PerformanceTiming::connectEnd):
+        * platform/network/ResourceResponseBase.cpp:
+        (WebCore::ResourceResponseBase::ResourceResponseBase):
+        (WebCore::ResourceResponseBase::connectionReused): Deleted.
+        (WebCore::ResourceResponseBase::setConnectionReused): Deleted.
+        (WebCore::ResourceResponseBase::connectionID): Deleted.
+        (WebCore::ResourceResponseBase::setConnectionID): Deleted.
+        * platform/network/ResourceResponseBase.h:
+        (WebCore::ResourceResponseBase::encode):
+        (WebCore::ResourceResponseBase::decode):
+
+2015-01-06  Chris Dumez  <cdumez@apple.com>
+
         Move the 'alt' CSS property to the new StyleBuilder
         https://bugs.webkit.org/show_bug.cgi?id=140129
 
index e264560..f36e823 100644 (file)
@@ -237,9 +237,7 @@ static PassRefPtr<Inspector::Protocol::Network::Response> buildObjectForResource
         .setStatus(status)
         .setStatusText(response.httpStatusText())
         .setHeaders(headers)
-        .setMimeType(response.mimeType())
-        .setConnectionReused(response.connectionReused())
-        .setConnectionId(response.connectionID());
+        .setMimeType(response.mimeType());
 
     responseObject->setFromDiskCache(response.source() == ResourceResponse::Source::DiskCache || response.source() == ResourceResponse::Source::DiskCacheAfterValidation);
     responseObject->setTiming(buildObjectForTiming(response.resourceLoadTiming(), loader));
index 226111d..fb07be4 100644 (file)
@@ -80,7 +80,6 @@ PerformanceResourceTiming::PerformanceResourceTiming(const AtomicString& initiat
     , m_initiatorType(initiatorType)
     , m_timing(response.resourceLoadTiming())
     , m_finishTime(finishTime)
-    , m_didReuseConnection(response.connectionReused())
     , m_shouldReportDetails(passesTimingAllowCheck(response, requestingDocument))
     , m_requestingDocument(requestingDocument)
 {
@@ -144,7 +143,7 @@ double PerformanceResourceTiming::connectStart() const
         return 0.0;
 
     // connectStart will be -1 when a network request is not made.
-    if (m_timing.connectStart < 0 || m_didReuseConnection)
+    if (m_timing.connectStart < 0)
         return domainLookupEnd();
 
     // connectStart includes any DNS time, so we may need to trim that off.
@@ -161,7 +160,7 @@ double PerformanceResourceTiming::connectEnd() const
         return 0.0;
 
     // connectStart will be -1 when a network request is not made.
-    if (m_timing.connectEnd < 0 || m_didReuseConnection)
+    if (m_timing.connectEnd < 0)
         return connectStart();
 
     return resourceTimeToDocumentMilliseconds(m_timing.connectEnd);
index a92cf79..e785a46 100644 (file)
@@ -79,7 +79,6 @@ private:
     AtomicString m_initiatorType;
     ResourceLoadTiming m_timing;
     double m_finishTime;
-    bool m_didReuseConnection;
     bool m_shouldReportDetails;
     RefPtr<Document> m_requestingDocument;
 };
index bbd148d..f40916d 100644 (file)
@@ -165,7 +165,7 @@ unsigned long long PerformanceTiming::connectStart() const
     // connectStart will be -1 when a network request is not made.
     // Rather than exposing a special value that indicates no new connection, we "backfill" with domainLookupEnd.
     int connectStart = timing.connectStart;
-    if (connectStart < 0 || loader->response().connectionReused())
+    if (connectStart < 0)
         return domainLookupEnd();
 
     // ResourceLoadTiming's connect phase includes DNS, however Navigation Timing's
@@ -186,7 +186,7 @@ unsigned long long PerformanceTiming::connectEnd() const
     
     // connectEnd will be -1 when a network request is not made.
     // Rather than exposing a special value that indicates no new connection, we "backfill" with connectStart.
-    if (timing.connectEnd < 0 || loader->response().connectionReused())
+    if (timing.connectEnd < 0)
         return connectStart();
 
     return resourceLoadTimeRelativeToAbsolute(timing.connectEnd);
index 2b5a572..1b18b8a 100644 (file)
@@ -48,13 +48,11 @@ ResourceResponseBase::ResourceResponseBase()
     : m_expectedContentLength(0)
     , m_includesCertificateInfo(false)
     , m_httpStatusCode(0)
-    , m_connectionID(0)
     , m_cacheControlMaxAge(0)
     , m_age(0)
     , m_date(0)
     , m_expires(0)
     , m_lastModified(0)
-    , m_connectionReused(false)
     , m_isNull(true)
     , m_haveParsedCacheControlHeader(false)
     , m_haveParsedAgeHeader(false)
@@ -75,13 +73,11 @@ ResourceResponseBase::ResourceResponseBase(const URL& url, const String& mimeTyp
     , m_textEncodingName(textEncodingName)
     , m_includesCertificateInfo(true) // Empty but valid for synthetic responses.
     , m_httpStatusCode(0)
-    , m_connectionID(0)
     , m_cacheControlMaxAge(0)
     , m_age(0)
     , m_date(0)
     , m_expires(0)
     , m_lastModified(0)
-    , m_connectionReused(false)
     , m_isNull(false)
     , m_haveParsedCacheControlHeader(false)
     , m_haveParsedAgeHeader(false)
@@ -529,34 +525,6 @@ void ResourceResponseBase::setSource(Source source)
     m_source = source;
 }
 
-bool ResourceResponseBase::connectionReused() const
-{
-    lazyInit(AllFields);
-
-    return m_connectionReused;
-}
-
-void ResourceResponseBase::setConnectionReused(bool connectionReused)
-{
-    lazyInit(AllFields);
-
-    m_connectionReused = connectionReused;
-}
-
-unsigned ResourceResponseBase::connectionID() const
-{
-    lazyInit(AllFields);
-
-    return m_connectionID;
-}
-
-void ResourceResponseBase::setConnectionID(unsigned connectionID)
-{
-    lazyInit(AllFields);
-
-    m_connectionID = connectionID;
-}
-
 void ResourceResponseBase::lazyInit(InitLevel initLevel) const
 {
     const_cast<ResourceResponse*>(static_cast<const ResourceResponse*>(this))->platformLazyInit(initLevel);
index 16b306e..8bf72e1 100644 (file)
@@ -109,12 +109,6 @@ public:
     double expires() const;
     WEBCORE_EXPORT double lastModified() const;
 
-    unsigned connectionID() const;
-    void setConnectionID(unsigned);
-
-    bool connectionReused() const;
-    void setConnectionReused(bool);
-
     enum class Source { Unknown, Network, DiskCache, DiskCacheAfterValidation };
     WEBCORE_EXPORT Source source() const;
     WEBCORE_EXPORT void setSource(Source);
@@ -164,7 +158,6 @@ protected:
     mutable CertificateInfo m_certificateInfo;
 
     int m_httpStatusCode;
-    unsigned m_connectionID;
 
 private:
     mutable double m_cacheControlMaxAge;
@@ -174,8 +167,6 @@ private:
     mutable double m_lastModified;
 
 public:
-    bool m_connectionReused : 1;
-
     bool m_isNull : 1;
     
 private:
@@ -215,7 +206,6 @@ void ResourceResponseBase::encode(Encoder& encoder) const
     encoder << m_httpHeaderFields;
     encoder << m_resourceLoadTiming;
     encoder << m_httpStatusCode;
-    encoder << m_connectionID;
     encoder << m_includesCertificateInfo;
     if (m_includesCertificateInfo)
         encoder << m_certificateInfo;
@@ -252,8 +242,6 @@ bool ResourceResponseBase::decode(Decoder& decoder, ResourceResponseBase& respon
         return false;
     if (!decoder.decode(response.m_httpStatusCode))
         return false;
-    if (!decoder.decode(response.m_connectionID))
-        return false;
     if (!decoder.decode(response.m_includesCertificateInfo))
         return false;
     if (response.m_includesCertificateInfo) {