2010-11-07 Eric Seidel <eric@webkit.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Nov 2010 04:09:13 +0000 (04:09 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Nov 2010 04:09:13 +0000 (04:09 +0000)
        Reviewed by Adam Barth.

        Move Cache.* into loader/cache in as a start to cleaning up loader/
        https://bugs.webkit.org/show_bug.cgi?id=49153

        * Android.mk:
        * CMakeLists.txt:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * loader/cache/Cache.cpp: Renamed from WebCore/loader/Cache.cpp.
        (WebCore::cache):
        (WebCore::Cache::Cache):
        (WebCore::createResource):
        (WebCore::Cache::requestResource):
        (WebCore::Cache::requestUserCSSStyleSheet):
        (WebCore::Cache::revalidateResource):
        (WebCore::Cache::revalidationSucceeded):
        (WebCore::Cache::revalidationFailed):
        (WebCore::Cache::resourceForURL):
        (WebCore::Cache::deadCapacity):
        (WebCore::Cache::liveCapacity):
        (WebCore::Cache::pruneLiveResources):
        (WebCore::Cache::pruneDeadResources):
        (WebCore::Cache::setCapacities):
        (WebCore::Cache::makeResourcePurgeable):
        (WebCore::Cache::evict):
        (WebCore::Cache::addCachedResourceLoader):
        (WebCore::Cache::removeCachedResourceLoader):
        (WebCore::fastLog2):
        (WebCore::Cache::lruListFor):
        (WebCore::Cache::removeFromLRUList):
        (WebCore::Cache::insertInLRUList):
        (WebCore::Cache::resourceAccessed):
        (WebCore::Cache::removeFromLiveDecodedResourcesList):
        (WebCore::Cache::insertInLiveDecodedResourcesList):
        (WebCore::Cache::addToLiveResourcesSize):
        (WebCore::Cache::removeFromLiveResourcesSize):
        (WebCore::Cache::adjustSize):
        (WebCore::Cache::TypeStatistic::addResource):
        (WebCore::Cache::getStatistics):
        (WebCore::Cache::setDisabled):
        (WebCore::Cache::dumpStats):
        (WebCore::Cache::dumpLRULists):
        * loader/cache/Cache.h: Renamed from WebCore/loader/Cache.h.
        (WebCore::Cache::LRUList::LRUList):
        (WebCore::Cache::TypeStatistic::TypeStatistic):
        (WebCore::Cache::loader):
        (WebCore::Cache::disabled):
        (WebCore::Cache::setPruneEnabled):
        (WebCore::Cache::prune):
        (WebCore::Cache::setDeadDecodedDataDeletionInterval):
        (WebCore::Cache::deadDecodedDataDeletionInterval):
        (WebCore::Cache::remove):
        (WebCore::Cache::shouldMakeResourcePurgeableOnEviction):

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

WebCore/Android.mk
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.gyp/WebCore.gyp
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/loader/cache/Cache.cpp [moved from WebCore/loader/Cache.cpp with 100% similarity]
WebCore/loader/cache/Cache.h [moved from WebCore/loader/Cache.h with 100% similarity]

index d724c66..712fdf0 100644 (file)
@@ -343,7 +343,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
        html/parser/TextDocumentParser.cpp \
        html/parser/TextViewSourceParser.cpp \
        \
-       loader/Cache.cpp \
        loader/CachedCSSStyleSheet.cpp \
        loader/CachedFont.cpp \
        loader/CachedImage.cpp \
@@ -388,6 +387,8 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
        loader/appcache/DOMApplicationCache.cpp \
        loader/appcache/ManifestParser.cpp \
        \
+       loader/cache/Cache.cpp \
+       \
        loader/icon/IconDatabase.cpp \
        loader/icon/IconFetcher.cpp \
        loader/icon/IconLoader.cpp \
index f1bd015..211ccc3 100644 (file)
@@ -22,6 +22,7 @@ SET(WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/loader"
     "${WEBCORE_DIR}/loader/appcache"
     "${WEBCORE_DIR}/loader/archive"
+    "${WEBCORE_DIR}/loader/cache"
     "${WEBCORE_DIR}/loader/icon"
     "${WEBCORE_DIR}/mathml"
     "${WEBCORE_DIR}/notifications"
@@ -1138,7 +1139,6 @@ SET(WebCore_SOURCES
     inspector/ScriptBreakpoint.cpp
     inspector/TimelineRecordFactory.cpp
 
-    loader/Cache.cpp
     loader/CachedCSSStyleSheet.cpp
     loader/CachedFont.cpp
     loader/CachedImage.cpp
@@ -1191,6 +1191,8 @@ SET(WebCore_SOURCES
     loader/archive/ArchiveResource.cpp
     loader/archive/ArchiveResourceCollection.cpp
 
+    loader/cache/Cache.cpp
+
     loader/icon/IconDatabase.cpp
     loader/icon/IconLoader.cpp
     loader/icon/IconRecord.cpp
index 193d545..1c28b06 100644 (file)
@@ -1,3 +1,63 @@
+2010-11-07  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Move Cache.* into loader/cache in as a start to cleaning up loader/
+        https://bugs.webkit.org/show_bug.cgi?id=49153
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/cache/Cache.cpp: Renamed from WebCore/loader/Cache.cpp.
+        (WebCore::cache):
+        (WebCore::Cache::Cache):
+        (WebCore::createResource):
+        (WebCore::Cache::requestResource):
+        (WebCore::Cache::requestUserCSSStyleSheet):
+        (WebCore::Cache::revalidateResource):
+        (WebCore::Cache::revalidationSucceeded):
+        (WebCore::Cache::revalidationFailed):
+        (WebCore::Cache::resourceForURL):
+        (WebCore::Cache::deadCapacity):
+        (WebCore::Cache::liveCapacity):
+        (WebCore::Cache::pruneLiveResources):
+        (WebCore::Cache::pruneDeadResources):
+        (WebCore::Cache::setCapacities):
+        (WebCore::Cache::makeResourcePurgeable):
+        (WebCore::Cache::evict):
+        (WebCore::Cache::addCachedResourceLoader):
+        (WebCore::Cache::removeCachedResourceLoader):
+        (WebCore::fastLog2):
+        (WebCore::Cache::lruListFor):
+        (WebCore::Cache::removeFromLRUList):
+        (WebCore::Cache::insertInLRUList):
+        (WebCore::Cache::resourceAccessed):
+        (WebCore::Cache::removeFromLiveDecodedResourcesList):
+        (WebCore::Cache::insertInLiveDecodedResourcesList):
+        (WebCore::Cache::addToLiveResourcesSize):
+        (WebCore::Cache::removeFromLiveResourcesSize):
+        (WebCore::Cache::adjustSize):
+        (WebCore::Cache::TypeStatistic::addResource):
+        (WebCore::Cache::getStatistics):
+        (WebCore::Cache::setDisabled):
+        (WebCore::Cache::dumpStats):
+        (WebCore::Cache::dumpLRULists):
+        * loader/cache/Cache.h: Renamed from WebCore/loader/Cache.h.
+        (WebCore::Cache::LRUList::LRUList):
+        (WebCore::Cache::TypeStatistic::TypeStatistic):
+        (WebCore::Cache::loader):
+        (WebCore::Cache::disabled):
+        (WebCore::Cache::setPruneEnabled):
+        (WebCore::Cache::prune):
+        (WebCore::Cache::setDeadDecodedDataDeletionInterval):
+        (WebCore::Cache::deadDecodedDataDeletionInterval):
+        (WebCore::Cache::remove):
+        (WebCore::Cache::shouldMakeResourcePurgeableOnEviction):
+
 2010-11-05  Helder Correia  <helder@sencha.com>
 
         Reviewed by Andreas Kling.
index 1ccfbe3..5441d0e 100644 (file)
@@ -28,6 +28,7 @@ webcore_cppflags += \
        -I$(srcdir)/WebCore/loader \
        -I$(srcdir)/WebCore/loader/appcache \
        -I$(srcdir)/WebCore/loader/archive \
+       -I$(srcdir)/WebCore/loader/cache \
        -I$(srcdir)/WebCore/loader/icon \
        -I$(srcdir)/WebCore/mathml \
        -I$(srcdir)/WebCore/notifications \
@@ -1905,7 +1906,7 @@ webcore_sources += \
        WebCore/loader/archive/ArchiveResourceCollection.h \
        WebCore/loader/archive/ArchiveResource.cpp \
        WebCore/loader/archive/ArchiveResource.h \
-       WebCore/loader/Cache.cpp \
+       WebCore/loader/cache/Cache.cpp \
        WebCore/loader/CachedCSSStyleSheet.cpp \
        WebCore/loader/CachedCSSStyleSheet.h \
        WebCore/loader/CachedFont.cpp \
index 6ebf0a0..4792a2a 100644 (file)
       '../loader',
       '../loader/appcache',
       '../loader/archive',
+      '../loader/cache',
       '../loader/icon',
       '../mathml',
       '../notifications',
index 0ca45b3..0ef8e78 100644 (file)
             'loader/archive/ArchiveResource.h',
             'loader/archive/ArchiveResourceCollection.cpp',
             'loader/archive/ArchiveResourceCollection.h',
+            'loader/cache/Cache.cpp',
+            'loader/cache/Cache.h',
             'loader/icon/IconDatabase.cpp',
             'loader/icon/IconDatabase.h',
             'loader/icon/IconDatabaseClient.h',
             'loader/mac/ResourceLoaderMac.mm',
             'loader/win/DocumentLoaderWin.cpp',
             'loader/win/FrameLoaderWin.cpp',
-            'loader/Cache.cpp',
-            'loader/Cache.h',
             'loader/CachedMetadata.h',
             'loader/CachePolicy.h',
             'loader/CachedCSSStyleSheet.cpp',
index 3989742..5c0365f 100644 (file)
@@ -231,6 +231,7 @@ WEBCORE_INCLUDEPATH = \
     $$PWD/loader \
     $$PWD/loader/appcache \
     $$PWD/loader/archive \
+    $$PWD/loader/cache \
     $$PWD/loader/icon \
     $$PWD/mathml \
     $$PWD/notifications \
@@ -1031,7 +1032,7 @@ SOURCES += \
     loader/archive/ArchiveFactory.cpp \
     loader/archive/ArchiveResource.cpp \
     loader/archive/ArchiveResourceCollection.cpp \
-    loader/Cache.cpp \
+    loader/cache/Cache.cpp \
     loader/CachedCSSStyleSheet.cpp \
     loader/CachedFont.cpp \
     loader/CachedImage.cpp \
@@ -1930,7 +1931,7 @@ HEADERS += \
     loader/CachedResourceHandle.h \
     loader/CachedScript.h \
     loader/CachedXSLStyleSheet.h \
-    loader/Cache.h \
+    loader/cache/Cache.h \
     loader/CrossOriginAccessControl.h \
     loader/CrossOriginPreflightResultCache.h \
     loader/CachedResourceLoader.h \
index f5d75bf..ef26c42 100644 (file)
                        Name="loader"\r
                        >\r
                        <File\r
-                               RelativePath="..\loader\Cache.cpp"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\loader\Cache.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
                                RelativePath="..\loader\CachedCSSStyleSheet.cpp"\r
                                >\r
                        </File>\r
                                        </File>\r
                                </Filter>\r
                        </Filter>\r
+                       <Filter\r
+                               Name="cache"\r
+                               >\r
+                               <File\r
+                                       RelativePath="..\loader\cache\Cache.cpp"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\loader\cache\Cache.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
                </Filter>\r
                <Filter\r
                        Name="platform"\r
index a291e52..ef4113f 100644 (file)
                        name = XML;
                        sourceTree = "<group>";
                };
+               A8D2B2521287A56000AF4DDA /* cache */ = {
+                       isa = PBXGroup;
+                       children = (
+                               BCB16BFE0979C3BD00467741 /* Cache.cpp */,
+                               BCB16BFF0979C3BD00467741 /* Cache.h */,
+                       );
+                       path = cache;
+                       sourceTree = "<group>";
+               };
                A9D247F90D757E4100FDF959 /* Plugins */ = {
                        isa = PBXGroup;
                        children = (
                BCB16BFB0979C38700467741 /* loader */ = {
                        isa = PBXGroup;
                        children = (
+                               A8D2B2521287A56000AF4DDA /* cache */,
                                1A8F6BB00DB55CDC001DB794 /* appcache */,
                                512DD8E80D91E691000F89EE /* archive */,
                                5126E6B60A2E3AEF005C29FA /* icon */,
                                93A1EAA20A5634D8006960A0 /* mac */,
-                               BCB16BFE0979C3BD00467741 /* Cache.cpp */,
-                               BCB16BFF0979C3BD00467741 /* Cache.h */,
                                BCB16C000979C3BD00467741 /* CachedCSSStyleSheet.cpp */,
                                BCB16C010979C3BD00467741 /* CachedCSSStyleSheet.h */,
                                BC64B4C90CB4295D005F2B62 /* CachedFont.cpp */,