Remove unused methods of ResourceRequestBase
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Mar 2017 06:51:23 +0000 (06:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Mar 2017 06:51:23 +0000 (06:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169579

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-03-13
Reviewed by Youenn Fablet.

* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::reportUploadProgress): Deleted.
(WebCore::ResourceRequestBase::setReportUploadProgress): Deleted.
(WebCore::ResourceRequestBase::reportLoadTiming): Deleted.
(WebCore::ResourceRequestBase::setReportLoadTiming): Deleted.
(WebCore::ResourceRequestBase::reportRawHeaders): Deleted.
(WebCore::ResourceRequestBase::setReportRawHeaders): Deleted.
Remove unused code.

* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::willSendRequest):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):
Remove callers of setters that did nothing.

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

Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorNetworkAgent.cpp
Source/WebCore/loader/ResourceLoadNotifier.cpp
Source/WebCore/platform/network/ResourceRequestBase.h
Source/WebCore/xml/XMLHttpRequest.cpp

index 0a62e1a..b3ab6a1 100644 (file)
@@ -1,3 +1,27 @@
+2017-03-13  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Remove unused methods of ResourceRequestBase
+        https://bugs.webkit.org/show_bug.cgi?id=169579
+
+        Reviewed by Youenn Fablet.
+
+        * platform/network/ResourceRequestBase.h:
+        (WebCore::ResourceRequestBase::reportUploadProgress): Deleted.
+        (WebCore::ResourceRequestBase::setReportUploadProgress): Deleted.
+        (WebCore::ResourceRequestBase::reportLoadTiming): Deleted.
+        (WebCore::ResourceRequestBase::setReportLoadTiming): Deleted.
+        (WebCore::ResourceRequestBase::reportRawHeaders): Deleted.
+        (WebCore::ResourceRequestBase::setReportRawHeaders): Deleted.
+        Remove unused code.
+
+        * inspector/InspectorNetworkAgent.cpp:
+        (WebCore::InspectorNetworkAgent::willSendRequest):
+        * loader/ResourceLoadNotifier.cpp:
+        (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+        * xml/XMLHttpRequest.cpp:
+        (WebCore::XMLHttpRequest::createRequest):
+        Remove callers of setters that did nothing.
+
 2017-03-13  Youenn Fablet  <youenn@apple.com>
 
         Make RealtimeMediaSource::type an enum class
index 6bf450e..126bd27 100644 (file)
@@ -342,9 +342,6 @@ void InspectorNetworkAgent::willSendRequest(unsigned long identifier, DocumentLo
     for (auto& entry : m_extraRequestHeaders)
         request.setHTTPHeaderField(entry.key, entry.value);
 
-    request.setReportLoadTiming(true);
-    request.setReportRawHeaders(true);
-
     if (m_cacheDisabled) {
         request.setHTTPHeaderField(HTTPHeaderName::Pragma, "no-cache");
         request.setCachePolicy(ReloadIgnoringCacheData);
index 6b59c95..b7178fd 100644 (file)
@@ -133,13 +133,6 @@ void ResourceLoadNotifier::dispatchWillSendRequest(DocumentLoader* loader, unsig
         m_frame.loader().documentLoader()->didTellClientAboutLoad(request.url());
 
     InspectorInstrumentation::willSendRequest(&m_frame, identifier, loader, request, redirectResponse);
-
-    if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())
-        request.setReportLoadTiming(true);
-    else if (loader && !request.isNull() && request.url() == loader->url()) {
-        // Report WebTiming for all frames.
-        request.setReportLoadTiming(true);
-    }
 }
 
 void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r, ResourceLoader* resourceLoader)
index 86415ea..fb40530 100644 (file)
@@ -144,19 +144,6 @@ public:
     WEBCORE_EXPORT bool isConditional() const;
     WEBCORE_EXPORT void makeUnconditional();
 
-    // Whether the associated ResourceHandleClient needs to be notified of
-    // upload progress made for that resource.
-    bool reportUploadProgress() const { return m_reportUploadProgress; }
-    void setReportUploadProgress(bool reportUploadProgress) { m_reportUploadProgress = reportUploadProgress; }
-
-    // Whether the timing information should be collected for the request.
-    bool reportLoadTiming() const { return m_reportLoadTiming; }
-    void setReportLoadTiming(bool reportLoadTiming) { m_reportLoadTiming = reportLoadTiming; }
-
-    // Whether actual headers being sent/received should be collected and reported for the request.
-    bool reportRawHeaders() const { return m_reportRawHeaders; }
-    void setReportRawHeaders(bool reportRawHeaders) { m_reportRawHeaders = reportRawHeaders; }
-
     // Whether this request should be hidden from the Inspector.
     bool hiddenFromInspector() const { return m_hiddenFromInspector; }
     void setHiddenFromInspector(bool hiddenFromInspector) { m_hiddenFromInspector = hiddenFromInspector; }
@@ -234,9 +221,6 @@ protected:
     mutable bool m_platformRequestUpdated { false };
     mutable bool m_resourceRequestBodyUpdated { false };
     mutable bool m_platformRequestBodyUpdated { false };
-    bool m_reportUploadProgress { false };
-    bool m_reportLoadTiming { false };
-    bool m_reportRawHeaders { false };
     bool m_hiddenFromInspector { false };
     bool m_ignoreForRequestCount { false };
     ResourceLoadPriority m_priority { ResourceLoadPriority::Low };
index 8222121..47de185 100644 (file)
@@ -746,9 +746,6 @@ ExceptionOr<void> XMLHttpRequest::createRequest()
     m_error = false;
 
     if (m_async) {
-        if (m_upload)
-            request.setReportUploadProgress(true);
-
         // ThreadableLoader::create can return null here, for example if we're no longer attached to a page or if a content blocker blocks the load.
         // This is true while running onunload handlers.
         // FIXME: Maybe we need to be able to send XMLHttpRequests from onunload, <http://bugs.webkit.org/show_bug.cgi?id=10904>.