Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Apr 2015 10:22:09 +0000 (10:22 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Apr 2015 10:22:09 +0000 (10:22 +0000)
* NetworkProcess/cache/NetworkCacheEntry.cpp:
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.

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

Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h

index 50ab56d..a915532 100644 (file)
@@ -1,5 +1,13 @@
 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
 
+        Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
+
+        * NetworkProcess/cache/NetworkCacheEntry.cpp:
+        * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
+        (WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.
+
+2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
+
         [SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
         https://bugs.webkit.org/show_bug.cgi?id=143867
 
index 3aefce7..d14d878 100644 (file)
@@ -125,6 +125,7 @@ WebCore::SharedBuffer* Entry::buffer() const
     return m_buffer.get();
 }
 
+#if ENABLE(SHAREABLE_RESOURCE)
 ShareableResource::Handle& Entry::shareableResourceHandle() const
 {
     if (!m_buffer)
@@ -132,6 +133,7 @@ ShareableResource::Handle& Entry::shareableResourceHandle() const
 
     return m_shareableResourceHandle;
 }
+#endif
 
 bool Entry::needsValidation() const
 {
index 185c2be..cf20301 100644 (file)
@@ -79,7 +79,12 @@ inline FileTimes fileTimes(const String& path)
     struct stat fileInfo;
     if (stat(WebCore::fileSystemRepresentation(path).data(), &fileInfo))
         return { };
+#if PLATFORM(COCOA)
     return { std::chrono::system_clock::from_time_t(fileInfo.st_birthtime), std::chrono::system_clock::from_time_t(fileInfo.st_mtime) };
+#else
+    // FIXME: we need a way to get the creation time.
+    return { std::chrono::system_clock::from_time_t(fileInfo.st_ctime), std::chrono::system_clock::from_time_t(fileInfo.st_mtime) };
+#endif
 }
 
 inline void updateFileModificationTimeIfNeeded(const String& path)