Remove ResourceLoadInfo
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2013 00:50:48 +0000 (00:50 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2013 00:50:48 +0000 (00:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=113302

Reviewed by Benjamin Poulain.

Co-authored by Christophe Dumez.

Removed ResourceLoadInfo since it had been only used by Chromium port.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForResourceResponse):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* platform/network/ResourceLoadInfo.h: Removed.
* platform/network/ResourceResponseBase.cpp:
(WebCore):
(WebCore::ResourceResponseBase::reportMemoryUsage):
* platform/network/ResourceResponseBase.h:
(ResourceResponseBase):

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

13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.order
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/platform/network/ResourceLoadInfo.h [deleted file]
Source/WebCore/platform/network/ResourceResponseBase.cpp
Source/WebCore/platform/network/ResourceResponseBase.h

index 368f9a9..5fc976f 100644 (file)
@@ -1,5 +1,34 @@
 2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
 
+        Remove ResourceLoadInfo
+        https://bugs.webkit.org/show_bug.cgi?id=113302
+
+        Reviewed by Benjamin Poulain.
+
+        Co-authored by Christophe Dumez.
+
+        Removed ResourceLoadInfo since it had been only used by Chromium port.
+
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.order:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::buildObjectForResourceResponse):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::loadResourceSynchronously):
+        * platform/network/ResourceLoadInfo.h: Removed.
+        * platform/network/ResourceResponseBase.cpp:
+        (WebCore):
+        (WebCore::ResourceResponseBase::reportMemoryUsage):
+        * platform/network/ResourceResponseBase.h:
+        (ResourceResponseBase):
+
+2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
+
         Another Mac Lion build fix attempt after r148197.
 
         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
index ee1ae58..28c891e 100644 (file)
@@ -5922,7 +5922,6 @@ webcore_platform_sources += \
        Source/WebCore/platform/network/ResourceHandle.h \
        Source/WebCore/platform/network/ResourceHandleInternal.h \
        Source/WebCore/platform/network/ResourceHandleTypes.h \
-       Source/WebCore/platform/network/ResourceLoadInfo.h \
        Source/WebCore/platform/network/ResourceLoadPriority.h \
        Source/WebCore/platform/network/ResourceLoadTiming.cpp \
        Source/WebCore/platform/network/ResourceLoadTiming.h \
index 4984403..a4b2b90 100644 (file)
@@ -2356,7 +2356,6 @@ HEADERS += \
     platform/network/ResourceErrorBase.h \
     platform/network/ResourceHandle.h \
     platform/network/ResourceHandleTypes.h \
-    platform/network/ResourceLoadInfo.h \
     platform/network/ResourceLoadPriority.h \
     platform/network/ResourceLoadTiming.h \
     platform/network/ResourceRequestBase.h \
index 2286a31..cecc9dc 100644 (file)
@@ -38193,7 +38193,6 @@ __ZTVN7WebCore16PODFreeListArenaINS_15PODRedBlackTreeINS_11PODIntervalIiPNS_11Re
 __ZTVN7WebCore5TimerINS_14ResourceHandleEEE
 __ZTVN3WTF21MemoryInstrumentation7WrapperIN7WebCore14ResourceHandleEEE
 __ZTVN7WebCore5TimerINS_21ResourceLoadSchedulerEEE
-__ZTVN3WTF21MemoryInstrumentation7WrapperIN7WebCore16ResourceLoadInfoEEE
 __ZTVN3WTF21MemoryInstrumentation7WrapperIN7WebCore18ResourceLoadTimingEEE
 __ZTVN3WTF21MemoryInstrumentation7WrapperIN7WebCore7RuleSetEEE
 __ZTVN3WTF21MemoryInstrumentation7WrapperINS_6VectorIN7WebCore8RuleDataELm0EEEEE
index 4a2b8aa..b0a0ac4 100755 (executable)
                                        >
                                </File>
                                <File
-                                       RelativePath="..\platform\network\ResourceLoadInfo.h"
-                                       >
-                               </File>
-                               <File
                                        RelativePath="..\platform\network\ResourceLoadPriority.h"
                                        >
                                </File>
index 8876833..8bbb437 100644 (file)
     <ClInclude Include="..\platform\network\ResourceHandleClient.h" />
     <ClInclude Include="..\platform\network\ResourceHandleInternal.h" />
     <ClInclude Include="..\platform\network\ResourceHandleTypes.h" />
-    <ClInclude Include="..\platform\network\ResourceLoadInfo.h" />
     <ClInclude Include="..\platform\network\ResourceLoadPriority.h" />
     <ClInclude Include="..\platform\network\ResourceLoadTiming.h" />
     <ClInclude Include="..\platform\network\ResourceRequestBase.h" />
index 782a02b..17cc98c 100644 (file)
     <ClInclude Include="..\platform\network\ResourceHandleTypes.h">
       <Filter>platform\network</Filter>
     </ClInclude>
-    <ClInclude Include="..\platform\network\ResourceLoadInfo.h">
-      <Filter>platform\network</Filter>
-    </ClInclude>
     <ClInclude Include="..\platform\network\ResourceLoadPriority.h">
       <Filter>platform\network</Filter>
     </ClInclude>
index 1ad9b9f..f60a83d 100644 (file)
                49140257168E02EC002D6C6A /* TimelineTraceEventProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 49140255168E02B4002D6C6A /* TimelineTraceEventProcessor.h */; };
                49182B5215DCE6F000548418 /* PlatformInstrumentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49182B5015DCE6F000548418 /* PlatformInstrumentation.cpp */; };
                49182B5315DCE6F000548418 /* PlatformInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49182B5115DCE6F000548418 /* PlatformInstrumentation.h */; };
-               492863991253B8FC00F792D6 /* ResourceLoadInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 492863981253B8FC00F792D6 /* ResourceLoadInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
                49291E4B134172C800E753DE /* ImageRenderingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 49291E4A134172C800E753DE /* ImageRenderingMode.h */; };
                493E5E0912D6420500020081 /* PlatformCALayerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 493E5E0812D6420500020081 /* PlatformCALayerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4945BFD313CF809000CC3B38 /* TransformState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4945BFD113CF809000CC3B38 /* TransformState.cpp */; };
                49140255168E02B4002D6C6A /* TimelineTraceEventProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineTraceEventProcessor.h; sourceTree = "<group>"; };
                49182B5015DCE6F000548418 /* PlatformInstrumentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformInstrumentation.cpp; sourceTree = "<group>"; };
                49182B5115DCE6F000548418 /* PlatformInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformInstrumentation.h; sourceTree = "<group>"; };
-               492863981253B8FC00F792D6 /* ResourceLoadInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadInfo.h; sourceTree = "<group>"; };
                49291E4A134172C800E753DE /* ImageRenderingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageRenderingMode.h; sourceTree = "<group>"; };
                493E5E0812D6420500020081 /* PlatformCALayerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformCALayerClient.h; path = ca/PlatformCALayerClient.h; sourceTree = "<group>"; };
                4945BFD113CF809000CC3B38 /* TransformState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TransformState.cpp; path = transforms/TransformState.cpp; sourceTree = "<group>"; };
                                514C76650CE923A1007EF3CD /* ResourceHandleClient.h */,
                                514C76660CE923A1007EF3CD /* ResourceHandleInternal.h */,
                                51E4143216A6595100C633C7 /* ResourceHandleTypes.h */,
-                               492863981253B8FC00F792D6 /* ResourceLoadInfo.h */,
                                E4295FA312B0614E00D1ACE0 /* ResourceLoadPriority.h */,
                                861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */,
                                8A81BF8411DCFD9000DA2B98 /* ResourceLoadTiming.h */,
                                656D373F0ADBA5DE00A4554D /* ResourceLoader.h in Headers */,
                                D0A3A7311405A39800FB8ED3 /* ResourceLoaderOptions.h in Headers */,
                                51AF503616F100F60095B2E8 /* ResourceLoaderTypes.h in Headers */,
-                               492863991253B8FC00F792D6 /* ResourceLoadInfo.h in Headers */,
                                973E325710883B7C005BC493 /* ResourceLoadNotifier.h in Headers */,
                                E4295FA412B0614E00D1ACE0 /* ResourceLoadPriority.h in Headers */,
                                D0CE58F9125E4CC200F3F199 /* ResourceLoadScheduler.h in Headers */,
index fa80358..0b9a4f7 100644 (file)
@@ -148,26 +148,13 @@ static PassRefPtr<TypeBuilder::Network::Response> buildObjectForResourceResponse
     if (response.isNull())
         return 0;
 
-
-    double status;
-    String statusText;
-    if (response.resourceLoadInfo() && response.resourceLoadInfo()->httpStatusCode) {
-        status = response.resourceLoadInfo()->httpStatusCode;
-        statusText = response.resourceLoadInfo()->httpStatusText;
-    } else {
-        status = response.httpStatusCode();
-        statusText = response.httpStatusText();
-    }
-    RefPtr<InspectorObject> headers;
-    if (response.resourceLoadInfo())
-        headers = buildObjectForHeaders(response.resourceLoadInfo()->responseHeaders);
-    else
-        headers = buildObjectForHeaders(response.httpHeaderFields());
+    double status = response.httpStatusCode();
+    RefPtr<InspectorObject> headers = buildObjectForHeaders(response.httpHeaderFields());
 
     RefPtr<TypeBuilder::Network::Response> responseObject = TypeBuilder::Network::Response::create()
         .setUrl(response.url().string())
         .setStatus(status)
-        .setStatusText(statusText)
+        .setStatusText(response.httpStatusText())
         .setHeaders(headers)
         .setMimeType(response.mimeType())
         .setConnectionReused(response.connectionReused())
@@ -177,15 +164,6 @@ static PassRefPtr<TypeBuilder::Network::Response> buildObjectForResourceResponse
     if (response.resourceLoadTiming())
         responseObject->setTiming(buildObjectForTiming(*response.resourceLoadTiming(), loader));
 
-    if (response.resourceLoadInfo()) {
-        if (!response.resourceLoadInfo()->responseHeadersText.isEmpty())
-            responseObject->setHeadersText(response.resourceLoadInfo()->responseHeadersText);
-
-        responseObject->setRequestHeaders(buildObjectForHeaders(response.resourceLoadInfo()->requestHeaders));
-        if (!response.resourceLoadInfo()->requestHeadersText.isEmpty())
-            responseObject->setRequestHeadersText(response.resourceLoadInfo()->requestHeadersText);
-    }
-
     return responseObject;
 }
 
index 5be5d87..4a939ba 100644 (file)
@@ -2587,8 +2587,7 @@ unsigned long FrameLoader::loadResourceSynchronously(const ResourceRequest& requ
             documentLoader()->applicationCacheHost()->maybeLoadFallbackSynchronously(newRequest, error, response, data);
         }
     }
-    int encodedDataLength = response.resourceLoadInfo() ? static_cast<int>(response.resourceLoadInfo()->encodedDataLength) : -1;
-    notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, request, response, data.data(), data.size(), encodedDataLength, error);
+    notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, request, response, data.data(), data.size(), -1, error);
     return identifier;
 }
 
diff --git a/Source/WebCore/platform/network/ResourceLoadInfo.h b/Source/WebCore/platform/network/ResourceLoadInfo.h
deleted file mode 100644 (file)
index 5fc06ab..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2010 Google, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-
-#ifndef ResourceLoadInfo_h
-#define ResourceLoadInfo_h
-
-#include "HTTPHeaderMap.h"
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-struct ResourceLoadInfo : RefCounted<ResourceLoadInfo> {
-    ResourceLoadInfo()
-        : httpStatusCode(0)
-        , encodedDataLength(-1) { }
-
-    int httpStatusCode;
-    String httpStatusText;
-    long long encodedDataLength;
-    HTTPHeaderMap requestHeaders;
-    HTTPHeaderMap responseHeaders;
-    String requestHeadersText;
-    String responseHeadersText;
-};
-
-}
-
-#endif
index f9f9fde..703c296 100644 (file)
@@ -589,20 +589,6 @@ void ResourceResponseBase::setResourceLoadTiming(PassRefPtr<ResourceLoadTiming>
     m_resourceLoadTiming = resourceLoadTiming;
 }
 
-PassRefPtr<ResourceLoadInfo> ResourceResponseBase::resourceLoadInfo() const
-{
-    lazyInit(CommonAndUncommonFields);
-
-    return m_resourceLoadInfo.get();
-}
-
-void ResourceResponseBase::setResourceLoadInfo(PassRefPtr<ResourceLoadInfo> loadInfo)
-{
-    lazyInit(CommonAndUncommonFields);
-
-    m_resourceLoadInfo = loadInfo;
-}
-
 void ResourceResponseBase::lazyInit(InitLevel initLevel) const
 {
     const_cast<ResourceResponse*>(static_cast<const ResourceResponse*>(this))->platformLazyInit(initLevel);
@@ -618,7 +604,6 @@ void ResourceResponseBase::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo)
     info.addMember(m_httpStatusText, "httpStatusText");
     info.addMember(m_httpHeaderFields, "httpHeaderFields");
     info.addMember(m_resourceLoadTiming, "resourceLoadTiming");
-    info.addMember(m_resourceLoadInfo, "resourceLoadInfo");
 }
     
 bool ResourceResponseBase::compare(const ResourceResponse& a, const ResourceResponse& b)
index 78c595d..8af24a4 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "HTTPHeaderMap.h"
 #include "KURL.h"
-#include "ResourceLoadInfo.h"
 #include "ResourceLoadTiming.h"
 
 #include <wtf/PassOwnPtr.h>
@@ -118,9 +117,6 @@ public:
     ResourceLoadTiming* resourceLoadTiming() const;
     void setResourceLoadTiming(PassRefPtr<ResourceLoadTiming>);
 
-    PassRefPtr<ResourceLoadInfo> resourceLoadInfo() const;
-    void setResourceLoadInfo(PassRefPtr<ResourceLoadInfo>);
-
     // The ResourceResponse subclass may "shadow" this method to provide platform-specific memory usage information
     unsigned memoryUsage() const
     {
@@ -164,7 +160,6 @@ protected:
     unsigned m_connectionID;
     bool m_connectionReused : 1;
     RefPtr<ResourceLoadTiming> m_resourceLoadTiming;
-    RefPtr<ResourceLoadInfo> m_resourceLoadInfo;
 
     bool m_isNull : 1;