diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-05-24 08:28:08 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-05-24 08:28:08 +0000 |
| commit | a4e969f4965059196ca948db781e52f7cfebf19e (patch) | |
| tree | 6ca352808c8fdc52006a0f33f6ae3c593b23867d /Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h | |
| parent | 41386e9cb918eed93b3f13648cbef387e371e451 (diff) | |
| download | WebKitGtk-tarball-a4e969f4965059196ca948db781e52f7cfebf19e.tar.gz | |
webkitgtk-2.12.3webkitgtk-2.12.3
Diffstat (limited to 'Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h')
| -rw-r--r-- | Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h b/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h index e16428907..04f61fd0b 100644 --- a/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h +++ b/Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h @@ -28,9 +28,11 @@ #include <WebCore/SQLiteDatabase.h> #include <wtf/HashSet.h> +#include <wtf/Optional.h> #include <wtf/PassRefPtr.h> #include <wtf/RefPtr.h> #include <wtf/ThreadSafeRefCounted.h> +#include <wtf/WorkQueue.h> #include <wtf/text/StringHash.h> #include <wtf/text/WTFString.h> @@ -38,28 +40,35 @@ namespace WebCore { class SecurityOrigin; } -class WorkQueue; - namespace WebKit { +struct LocalStorageDetails; + class LocalStorageDatabaseTracker : public ThreadSafeRefCounted<LocalStorageDatabaseTracker> { public: - static PassRefPtr<LocalStorageDatabaseTracker> create(PassRefPtr<WorkQueue>); + static PassRefPtr<LocalStorageDatabaseTracker> create(PassRefPtr<WorkQueue>, const String& localStorageDirectory); ~LocalStorageDatabaseTracker(); - void setLocalStorageDirectory(const String&); String databasePath(WebCore::SecurityOrigin*) const; void didOpenDatabaseWithOrigin(WebCore::SecurityOrigin*); void deleteDatabaseWithOrigin(WebCore::SecurityOrigin*); void deleteAllDatabases(); - Vector<RefPtr<WebCore::SecurityOrigin>> origins() const; + // Returns a vector of the origins whose databases have been deleted. + Vector<Ref<WebCore::SecurityOrigin>> deleteDatabasesModifiedSince(std::chrono::system_clock::time_point); -private: - explicit LocalStorageDatabaseTracker(PassRefPtr<WorkQueue>); + Vector<Ref<WebCore::SecurityOrigin>> origins() const; - void setLocalStorageDirectoryInternal(StringImpl*); + struct OriginDetails { + String originIdentifier; + Optional<time_t> creationTime; + Optional<time_t> modificationTime; + }; + Vector<OriginDetails> originDetails(); + +private: + LocalStorageDatabaseTracker(PassRefPtr<WorkQueue>, const String& localStorageDirectory); String databasePath(const String& filename) const; String trackerDatabasePath() const; |
