summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-06-08 10:42:33 +0100
committerSteve Block <steveblock@google.com>2011-06-08 13:52:19 +0100
commit5461f2587f09db45fac0a6f6e1b9c62f638aebc0 (patch)
treeaf1db1ccafffc50b49e7edbf1a85845e4ea2a8d3 /Source/WebCore
parent74ee772b3c1ea8b557e5a596e9cbc655d1c0e161 (diff)
downloadexternal_webkit-5461f2587f09db45fac0a6f6e1b9c62f638aebc0.zip
external_webkit-5461f2587f09db45fac0a6f6e1b9c62f638aebc0.tar.gz
external_webkit-5461f2587f09db45fac0a6f6e1b9c62f638aebc0.tar.bz2
Merge WebKit at r82507: Fix conflicts due to new StorageTracker
- FileSystemAndroid.cpp, FileSystemPOSIX.cpp Use new common version of listDirectory(), which is identical to the existing Android version. - StorageNamespace.h, StorageNamespaceImpl.h Conflict due to Android's clearPage() - PageGroup.cpp Conflict due to Android's clearDomStorage() See http://trac.webkit.org/changeset/80892 Change-Id: Ifac131155f5019959de8761438cd0372547b0e6c
Diffstat (limited to 'Source/WebCore')
-rw-r--r--Source/WebCore/page/PageGroup.cpp91
-rw-r--r--Source/WebCore/platform/android/FileSystemAndroid.cpp24
-rw-r--r--Source/WebCore/platform/posix/FileSystemPOSIX.cpp11
-rw-r--r--Source/WebCore/storage/StorageNamespace.h10
-rw-r--r--Source/WebCore/storage/StorageNamespaceImpl.h11
5 files changed, 52 insertions, 95 deletions
diff --git a/Source/WebCore/page/PageGroup.cpp b/Source/WebCore/page/PageGroup.cpp
index d53de08..969e2a6 100644
--- a/Source/WebCore/page/PageGroup.cpp
+++ b/Source/WebCore/page/PageGroup.cpp
@@ -116,19 +116,57 @@ void PageGroup::closeLocalStorage()
#endif
}
-<<<<<<< HEAD
-#if ENABLE(DOM_STORAGE) && defined(ANDROID)
-void PageGroup::clearDomStorage()
-=======
#if ENABLE(DOM_STORAGE)
void PageGroup::clearLocalStorageForAllOrigins()
->>>>>>> webkit.org at r82507
{
if (!pageGroups)
return;
-<<<<<<< HEAD
+ PageGroupMap::iterator end = pageGroups->end();
+ for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) {
+ if (it->second->hasLocalStorage())
+ it->second->localStorage()->clearAllOriginsForDeletion();
+ }
+}
+
+void PageGroup::clearLocalStorageForOrigin(SecurityOrigin* origin)
+{
+ if (!pageGroups)
+ return;
+
+ PageGroupMap::iterator end = pageGroups->end();
+ for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) {
+ if (it->second->hasLocalStorage())
+ it->second->localStorage()->clearOriginForDeletion(origin);
+ }
+}
+
+void PageGroup::syncLocalStorage()
+{
+ if (!pageGroups)
+ return;
+
+ PageGroupMap::iterator end = pageGroups->end();
+ for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) {
+ if (it->second->hasLocalStorage())
+ it->second->localStorage()->sync();
+ }
+}
+
+unsigned PageGroup::numberOfPageGroups()
+{
+ if (!pageGroups)
+ return 0;
+
+ return pageGroups->size();
+}
+
+#if defined(ANDROID)
+void PageGroup::clearDomStorage()
+{
+ if (!pageGroups)
+ return;
PageGroupMap::iterator end = pageGroups->end();
@@ -206,47 +244,8 @@ void PageGroup::removeLocalStorage()
m_localStorage = 0;
}
-=======
- PageGroupMap::iterator end = pageGroups->end();
- for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) {
- if (it->second->hasLocalStorage())
- it->second->localStorage()->clearAllOriginsForDeletion();
- }
-}
-
-void PageGroup::clearLocalStorageForOrigin(SecurityOrigin* origin)
-{
- if (!pageGroups)
- return;
-
- PageGroupMap::iterator end = pageGroups->end();
- for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) {
- if (it->second->hasLocalStorage())
- it->second->localStorage()->clearOriginForDeletion(origin);
- }
-}
-
-void PageGroup::syncLocalStorage()
-{
- if (!pageGroups)
- return;
-
- PageGroupMap::iterator end = pageGroups->end();
- for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) {
- if (it->second->hasLocalStorage())
- it->second->localStorage()->sync();
- }
-}
-
-unsigned PageGroup::numberOfPageGroups()
-{
- if (!pageGroups)
- return 0;
-
- return pageGroups->size();
-}
+#endif // PLATFORM(ANDROID)
->>>>>>> webkit.org at r82507
#endif
void PageGroup::addPage(Page* page)
diff --git a/Source/WebCore/platform/android/FileSystemAndroid.cpp b/Source/WebCore/platform/android/FileSystemAndroid.cpp
index 30dc1d3..5efba84 100644
--- a/Source/WebCore/platform/android/FileSystemAndroid.cpp
+++ b/Source/WebCore/platform/android/FileSystemAndroid.cpp
@@ -86,30 +86,6 @@ String homeDirectoryPath()
return sPluginPath;
}
-Vector<String> listDirectory(const String& path, const String& filter)
-{
- Vector<String> entries;
- CString cpath = path.utf8();
- CString cfilter = filter.utf8();
- DIR* dir = opendir(cpath.data());
- if (dir) {
- struct dirent* dp;
- while ((dp = readdir(dir))) {
- const char* name = dp->d_name;
- if (!strcmp(name, ".") || !strcmp(name, ".."))
- continue;
- if (fnmatch(cfilter.data(), name, 0))
- continue;
- char filePath[1024];
- if (static_cast<int>(sizeof(filePath) - 1) < snprintf(filePath, sizeof(filePath), "%s/%s", cpath.data(), name))
- continue; // buffer overflow
- entries.append(filePath);
- }
- closedir(dir);
- }
- return entries;
-}
-
// We define our own pathGetFileName rather than use the POSIX versions as we
// may get passed a content URI representing the path to the file. We pass
// the input through fileSystemRepresentation before using it to resolve it if
diff --git a/Source/WebCore/platform/posix/FileSystemPOSIX.cpp b/Source/WebCore/platform/posix/FileSystemPOSIX.cpp
index 9ad5f3a..c44b1d2 100644
--- a/Source/WebCore/platform/posix/FileSystemPOSIX.cpp
+++ b/Source/WebCore/platform/posix/FileSystemPOSIX.cpp
@@ -30,21 +30,10 @@
#include "FileSystem.h"
#include "PlatformString.h"
-<<<<<<< HEAD
-#ifdef ANDROID_PLUGINS
-#include <dirent.h>
-#endif
-#include <errno.h>
-#include <fcntl.h>
-#ifdef ANDROID_PLUGINS
-#include <fnmatch.h>
-#endif
-=======
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
->>>>>>> webkit.org at r82507
#include <libgen.h>
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/Source/WebCore/storage/StorageNamespace.h b/Source/WebCore/storage/StorageNamespace.h
index f5604b0..0571f16 100644
--- a/Source/WebCore/storage/StorageNamespace.h
+++ b/Source/WebCore/storage/StorageNamespace.h
@@ -50,16 +50,12 @@ public:
virtual PassRefPtr<StorageNamespace> copy() = 0;
virtual void close() = 0;
virtual void unlock() = 0;
-<<<<<<< HEAD
-
-#ifdef ANDROID
- virtual void clear(Page*) = 0;
-#endif
-=======
virtual void clearOriginForDeletion(SecurityOrigin*) = 0;
virtual void clearAllOriginsForDeletion() = 0;
virtual void sync() = 0;
->>>>>>> webkit.org at r82507
+#ifdef ANDROID
+ virtual void clear(Page*) = 0;
+#endif
};
} // namespace WebCore
diff --git a/Source/WebCore/storage/StorageNamespaceImpl.h b/Source/WebCore/storage/StorageNamespaceImpl.h
index 871f540..f13ff47 100644
--- a/Source/WebCore/storage/StorageNamespaceImpl.h
+++ b/Source/WebCore/storage/StorageNamespaceImpl.h
@@ -53,12 +53,6 @@ namespace WebCore {
virtual void close();
virtual void unlock();
-<<<<<<< HEAD
-#ifdef ANDROID
- virtual void clear(Page*);
-#endif
-
-=======
// Not removing the origin's StorageArea from m_storageAreaMap because
// we're just deleting the underlying db file. If an item is added immediately
// after file deletion, we want the same StorageArea to eventually trigger
@@ -67,7 +61,10 @@ namespace WebCore {
virtual void clearAllOriginsForDeletion();
virtual void sync();
->>>>>>> webkit.org at r82507
+#ifdef ANDROID
+ virtual void clear(Page*);
+#endif
+
private:
StorageNamespaceImpl(StorageType, const String& path, unsigned quota);