diff options
Diffstat (limited to 'WebCore/storage/DatabaseTracker.h')
-rw-r--r-- | WebCore/storage/DatabaseTracker.h | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/WebCore/storage/DatabaseTracker.h b/WebCore/storage/DatabaseTracker.h index 85e4858..c87b26a 100644 --- a/WebCore/storage/DatabaseTracker.h +++ b/WebCore/storage/DatabaseTracker.h @@ -31,41 +31,56 @@ #if ENABLE(DATABASE) -#include "DatabaseDetails.h" #include "PlatformString.h" + +#if !PLATFORM(CHROMIUM) +#include "DatabaseDetails.h" #include "SQLiteDatabase.h" #include "StringHash.h" #include <wtf/HashSet.h> #include <wtf/OwnPtr.h> +#endif // !PLATFORM(CHROMIUM) namespace WebCore { class Database; -class DatabaseTrackerClient; class Document; -class OriginQuotaManager; class SecurityOrigin; +#if !PLATFORM(CHROMIUM) +class DatabaseTrackerClient; +class OriginQuotaManager; + struct SecurityOriginHash; struct SecurityOriginTraits; +#endif // !PLATFORM(CHROMIUM) -class DatabaseTracker { +class DatabaseTracker : public Noncopyable { public: - void setDatabaseDirectoryPath(const String&); - const String& databaseDirectoryPath() const; + static DatabaseTracker& tracker(); bool canEstablishDatabase(Document*, const String& name, const String& displayName, unsigned long estimatedSize); void setDatabaseDetails(SecurityOrigin*, const String& name, const String& displayName, unsigned long estimatedSize); String fullPathForDatabase(SecurityOrigin*, const String& name, bool createIfDoesNotExist = true); + void addOpenDatabase(Database*); + void removeOpenDatabase(Database*); + + unsigned long long getMaxSizeForDatabase(const Database*); + +private: + DatabaseTracker(); + +#if !PLATFORM(CHROMIUM) +public: + void setDatabaseDirectoryPath(const String&); + const String& databaseDirectoryPath() const; + void origins(Vector<RefPtr<SecurityOrigin> >& result); bool databaseNamesForOrigin(SecurityOrigin*, Vector<String>& result); DatabaseDetails detailsForNameAndOrigin(const String&, SecurityOrigin*); - void addOpenDatabase(Database*); - void removeOpenDatabase(Database*); - unsigned long long usageForDatabase(const String&, SecurityOrigin*); unsigned long long usageForOrigin(SecurityOrigin*); unsigned long long quotaForOrigin(SecurityOrigin*); @@ -82,15 +97,10 @@ public: OriginQuotaManager& originQuotaManager(); - static DatabaseTracker& tracker(); bool hasEntryForOrigin(SecurityOrigin*); - unsigned long long getMaxSizeForDatabase(const Database*); - private: - DatabaseTracker(); - String trackerDatabasePath() const; void openTrackerDatabase(bool createIfDoesNotExist); @@ -130,6 +140,7 @@ private: static void scheduleForNotification(); static void notifyDatabasesChanged(void*); +#endif // !PLATFORM(CHROMIUM) }; } // namespace WebCore |