https://bugs.webkit.org/show_bug.cgi?id=77006
Patch by Gustavo Lima Chaves <glima@profusion.mobi> on 2012-02-01
Reviewed by Darin Adler.
There are no behavior changes with the diff, so no need for new tests.
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::setDatabaseDirectoryPath):
(WebCore):
(WebCore::StorageTracker::databaseDirectoryPath):
* storage/StorageTracker.h:
(StorageTracker):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106506
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-01 Gustavo Lima Chaves <glima@profusion.mobi>
+
+ Make one able to set the local storage (tracker) database dir's path
+ https://bugs.webkit.org/show_bug.cgi?id=77006
+
+ Reviewed by Darin Adler.
+
+ There are no behavior changes with the diff, so no need for new tests.
+
+ * storage/StorageTracker.cpp:
+ (WebCore::StorageTracker::setDatabaseDirectoryPath):
+ (WebCore):
+ (WebCore::StorageTracker::databaseDirectoryPath):
+ * storage/StorageTracker.h:
+ (StorageTracker):
+
2012-02-01 Anders Carlsson <andersca@apple.com>
Fix Window build.
{
}
+void StorageTracker::setDatabaseDirectoryPath(const String& path)
+{
+ MutexLocker lockStorage(m_databaseGuard);
+
+ if (m_database.isOpen())
+ m_database.close();
+
+ m_storageDirectoryPath = path.isolatedCopy();
+
+ {
+ MutexLocker lockOrigins(m_originSetGuard);
+ m_originSet.clear();
+ }
+
+ if (!m_isActive)
+ return;
+
+ importOriginIdentifiers();
+}
+
+String StorageTracker::databaseDirectoryPath() const
+{
+ return m_storageDirectoryPath.isolatedCopy();
+}
+
String StorageTracker::trackerDatabasePath()
{
ASSERT(!m_databaseGuard.tryLock());
static void initializeTracker(const String& storagePath, StorageTrackerClient*);
static StorageTracker& tracker();
+ void setDatabaseDirectoryPath(const String&);
+ String databaseDirectoryPath() const;
+
void setOriginDetails(const String& originIdentifier, const String& databaseFile);
void deleteAllOrigins();