platform/sql/SQLValue.cpp
platform/sql/SQLiteAuthorizer.cpp
platform/sql/SQLiteDatabase.cpp
+ platform/sql/SQLiteDatabaseTracker.cpp
platform/sql/SQLiteFileSystem.cpp
platform/sql/SQLiteStatement.cpp
platform/sql/SQLiteTransaction.cpp
+2014-01-25 Sam Weinig <sam@webkit.org>
+
+ Remove some iOS #ifdefs by adding SQLiteDatabaseTracker to all the builds
+ https://bugs.webkit.org/show_bug.cgi?id=127632
+
+ Reviewed by Darin Adler.
+
+ Move the SQLiteDatabaseTracker and client from platform/sql/ios to platform/sql,
+ as there is nothing iOS specific about it. Then, un-#ifdef all its uses. For
+ ports that don't setup a client, this has no change in behavior.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Modules/webdatabase/DatabaseBackendBase.cpp:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ * platform/ScrollableArea.h:
+ (WebCore::ScrollableArea::sendWillRevealEdgeEventsIfNeeded):
+ * platform/sql/SQLiteDatabaseTracker.cpp: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTracker.cpp.
+ * platform/sql/SQLiteDatabaseTracker.h: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTracker.h.
+ * platform/sql/SQLiteDatabaseTrackerClient.h: Copied from Source/WebCore/platform/sql/ios/SQLiteDatabaseTrackerClient.h.
+ * platform/sql/ios: Removed.
+ * platform/sql/ios/SQLiteDatabaseTracker.cpp: Removed.
+ * platform/sql/ios/SQLiteDatabaseTracker.h: Removed.
+ * platform/sql/ios/SQLiteDatabaseTrackerClient.h: Removed.
+ * storage/StorageAreaSync.cpp:
+ (WebCore::StorageAreaSync::openDatabase):
+ (WebCore::StorageAreaSync::sync):
+ * storage/StorageTracker.cpp:
+
2014-01-25 Anders Carlsson <andersca@apple.com>
Remove an unused FrameLoaderClient function
Source/WebCore/platform/sql/SQLiteAuthorizer.cpp \
Source/WebCore/platform/sql/SQLiteDatabase.cpp \
Source/WebCore/platform/sql/SQLiteDatabase.h \
+ Source/WebCore/platform/sql/SQLiteDatabaseTracker.cpp \
+ Source/WebCore/platform/sql/SQLiteDatabaseTracker.h \
+ Source/WebCore/platform/sql/SQLiteDatabaseTrackerClient.h \
Source/WebCore/platform/sql/SQLiteFileSystem.cpp \
Source/WebCore/platform/sql/SQLiteFileSystem.h \
Source/WebCore/platform/sql/SQLiteStatement.cpp \
#include "DatabaseTracker.h"
#include "ExceptionCode.h"
#include "Logging.h"
+#include "SQLiteDatabaseTracker.h"
#include "SQLiteStatement.h"
#include "SQLiteTransaction.h"
#include "SecurityOrigin.h"
#include <wtf/text/CString.h>
#include <wtf/text/StringHash.h>
-#if PLATFORM(IOS)
-#include "SQLiteDatabaseTracker.h"
-#endif
-
// Registering "opened" databases with the DatabaseTracker
// =======================================================
// The DatabaseTracker maintains a list of databases that have been
// Make sure we wait till the background removal of the empty database files finished before trying to open any database.
MutexLocker locker(DatabaseTracker::openDatabaseMutex());
}
- SQLiteTransactionInProgressAutoCounter transactionCounter;
#endif
+ SQLiteTransactionInProgressAutoCounter transactionCounter;
+
if (!m_sqliteDatabase.open(m_filename, true)) {
errorMessage = formatErrorMessage("unable to open database", m_sqliteDatabase.lastError(), m_sqliteDatabase.lastErrorMsg());
return false;
void DatabaseBackendBase::incrementalVacuumIfNeeded()
{
-#if PLATFORM(IOS)
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
int64_t freeSpaceSize = m_sqliteDatabase.freeSpaceSize();
int64_t totalSize = m_sqliteDatabase.totalSize();
if (totalSize <= 10 * freeSpaceSize) {
</ClCompile>
<ClCompile Include="..\platform\sql\SQLiteAuthorizer.cpp" />
<ClCompile Include="..\platform\sql\SQLiteDatabase.cpp" />
+ <ClCompile Include="..\platform\sql\SQLiteDatabaseTracker.cpp" />
<ClCompile Include="..\platform\sql\SQLiteFileSystem.cpp" />
<ClCompile Include="..\platform\sql\SQLiteStatement.cpp" />
<ClCompile Include="..\platform\sql\SQLiteTransaction.cpp" />
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</CustomBuildStep>
<ClInclude Include="..\platform\sql\SQLiteDatabase.h" />
+ <ClInclude Include="..\platform\sql\SQLiteDatabaseTracker.h" />
+ <ClInclude Include="..\platform\sql\SQLiteDatabaseTrackerClient.h" />
<ClInclude Include="..\platform\sql\SQLiteFileSystem.h" />
<ClInclude Include="..\platform\sql\SQLiteStatement.h" />
<ClInclude Include="..\platform\sql\SQLiteTransaction.h" />
<ClCompile Include="..\platform\sql\SQLiteDatabase.cpp">
<Filter>platform\sql</Filter>
</ClCompile>
+ <ClCompile Include="..\platform\sql\SQLiteDatabaseTracker.cpp">
+ <Filter>platform\sql</Filter>
+ </ClCompile>
<ClCompile Include="..\platform\sql\SQLiteFileSystem.cpp">
<Filter>platform\sql</Filter>
</ClCompile>
<ClInclude Include="..\platform\sql\SQLiteDatabase.h">
<Filter>platform\sql</Filter>
</ClInclude>
+ <ClInclude Include="..\platform\sql\SQLiteDatabaseTracker.h">
+ <Filter>platform\sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\platform\sql\SQLiteDatabaseTrackerClient.h">
+ <Filter>platform\sql</Filter>
+ </ClInclude>
<ClInclude Include="..\platform\sql\SQLiteFileSystem.h">
<Filter>platform\sql</Filter>
</ClInclude>
7E428CE413E3407F003B661C /* ResourceHandleIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceHandleIOS.mm; sourceTree = "<group>"; };
7E46F6F81627A2C900062223 /* JSOESElementIndexUint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESElementIndexUint.cpp; sourceTree = "<group>"; };
7E46F6F91627A2C900062223 /* JSOESElementIndexUint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESElementIndexUint.h; sourceTree = "<group>"; };
- 7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteDatabaseTrackerClient.h; sourceTree = "<group>"; };
- 7E474E1C12494DC900235364 /* SQLiteDatabaseTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteDatabaseTracker.h; sourceTree = "<group>"; };
- 7E474E1D12494DC900235364 /* SQLiteDatabaseTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SQLiteDatabaseTracker.cpp; sourceTree = "<group>"; };
+ 7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteDatabaseTrackerClient.h; path = sql/SQLiteDatabaseTrackerClient.h; sourceTree = "<group>"; };
+ 7E474E1C12494DC900235364 /* SQLiteDatabaseTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteDatabaseTracker.h; path = sql/SQLiteDatabaseTracker.h; sourceTree = "<group>"; };
+ 7E474E1D12494DC900235364 /* SQLiteDatabaseTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLiteDatabaseTracker.cpp; path = sql/SQLiteDatabaseTracker.cpp; sourceTree = "<group>"; };
7E5D7A73161D3F8F00896C34 /* OESElementIndexUint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OESElementIndexUint.cpp; path = canvas/OESElementIndexUint.cpp; sourceTree = "<group>"; };
7E5D7A74161D3F8F00896C34 /* OESElementIndexUint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OESElementIndexUint.h; path = canvas/OESElementIndexUint.h; sourceTree = "<group>"; };
7E66E23116D6EB6C00F7E7FF /* WebGLCompressedTextureATC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLCompressedTextureATC.cpp; path = canvas/WebGLCompressedTextureATC.cpp; sourceTree = "<group>"; };
1A2E6E560CC551E0004A2062 /* sql */ = {
isa = PBXGroup;
children = (
- 7E474E1912494DA900235364 /* ios */,
+ 7E474E1D12494DC900235364 /* SQLiteDatabaseTracker.cpp */,
+ 7E474E1C12494DC900235364 /* SQLiteDatabaseTracker.h */,
+ 7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */,
1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */,
1A2246430CC98DDB00C05240 /* SQLiteDatabase.cpp */,
1A2246440CC98DDB00C05240 /* SQLiteDatabase.h */,
path = icu;
sourceTree = "<group>";
};
- 7E474E1912494DA900235364 /* ios */ = {
- isa = PBXGroup;
- children = (
- 7E474E1D12494DC900235364 /* SQLiteDatabaseTracker.cpp */,
- 7E474E1C12494DC900235364 /* SQLiteDatabaseTracker.h */,
- 7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */,
- );
- name = ios;
- path = sql/ios;
- sourceTree = "<group>";
- };
7EE6847312D26E5500E79415 /* cf */ = {
isa = PBXGroup;
children = (
#include "ApplicationCacheHost.h"
#include "ApplicationCacheResource.h"
#include "FileSystem.h"
-#include "URL.h"
#include "NotImplemented.h"
+#include "SQLiteDatabaseTracker.h"
#include "SQLiteStatement.h"
#include "SQLiteTransaction.h"
#include "SecurityOrigin.h"
+#include "URL.h"
#include "UUID.h"
-#include <wtf/text/CString.h>
#include <wtf/StdLibExtras.h>
#include <wtf/StringExtras.h>
+#include <wtf/text/CString.h>
#include <wtf/text/StringBuilder.h>
-#if PLATFORM(IOS)
-#include "SQLiteDatabaseTracker.h"
-#endif
-
namespace WebCore {
static const char flatFileSubdirectory[] = "ApplicationCache";
ApplicationCacheGroup* ApplicationCacheStorage::loadCacheGroup(const URL& manifestURL)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
openDatabase(false);
if (!m_database.isOpen())
return 0;
// to avoid trying to open the database over and over if it doesn't exist.
hasLoadedHashes = true;
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
openDatabase(false);
if (!m_database.isOpen())
return;
if (!m_database.isOpen())
return 0;
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
// Check the database. Look for all cache groups with a newest cache.
SQLiteStatement statement(m_database, "SELECT id, manifestURL, newestCache FROM CacheGroups WHERE newestCache IS NOT NULL");
ApplicationCacheGroup* ApplicationCacheStorage::fallbackCacheGroupForURL(const URL& url)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
ASSERT(!url.hasFragmentIdentifier());
// Check if an appropriate cache already exists in memory.
bool ApplicationCacheStorage::calculateQuotaForOrigin(const SecurityOrigin* origin, int64_t& quota)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
// If an Origin record doesn't exist, then the COUNT will be 0 and quota will be 0.
// Using the count to determine if a record existed or not is a safe way to determine
// if a quota of 0 is real, from the record, or from null.
bool ApplicationCacheStorage::calculateUsageForOrigin(const SecurityOrigin* origin, int64_t& usage)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
// If an Origins record doesn't exist, then the SUM will be null,
// which will become 0, as expected, when converting to a number.
SQLiteStatement statement(m_database, "SELECT SUM(Caches.size)"
bool ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache(const SecurityOrigin* origin, ApplicationCache* cache, int64_t& remainingSize)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
openDatabase(false);
if (!m_database.isOpen())
return false;
bool ApplicationCacheStorage::storeUpdatedQuotaForOrigin(const SecurityOrigin* origin, int64_t quota)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
openDatabase(true);
if (!m_database.isOpen())
return false;
void ApplicationCacheStorage::openDatabase(bool createIfDoesNotExist)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
if (m_database.isOpen())
return;
bool ApplicationCacheStorage::storeUpdatedType(ApplicationCacheResource* resource, ApplicationCache* cache)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
ASSERT_UNUSED(cache, cache->storageID());
ASSERT(resource->storageID());
bool ApplicationCacheStorage::store(ApplicationCacheResource* resource, ApplicationCache* cache)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
ASSERT(cache->storageID());
openDatabase(true);
void ApplicationCacheStorage::remove(ApplicationCache* cache)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
if (!cache->storageID())
return;
void ApplicationCacheStorage::empty()
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
openDatabase(false);
if (!m_database.isOpen())
bool ApplicationCacheStorage::storeCopyOfCache(const String& cacheDirectory, ApplicationCacheHost* cacheHost)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
ApplicationCache* cache = cacheHost->applicationCache();
if (!cache)
return true;
bool ApplicationCacheStorage::manifestURLs(Vector<URL>* urls)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
ASSERT(urls);
openDatabase(false);
if (!m_database.isOpen())
bool ApplicationCacheStorage::cacheGroupSize(const String& manifestURL, int64_t* size)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
ASSERT(size);
openDatabase(false);
if (!m_database.isOpen())
bool ApplicationCacheStorage::deleteCacheGroup(const String& manifestURL)
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
SQLiteTransaction deleteTransaction(m_database);
// Check to see if the group is in memory.
ApplicationCacheGroup* group = m_cachesInMemory.get(manifestURL);
void ApplicationCacheStorage::vacuumDatabaseFile()
{
-#if PLATFORM(IOS)
- // FIXME: Move the PLATFORM(IOS)-guards inside the constructor and destructor of SQLiteTransactionInProgressAutoCounter.
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
openDatabase(false);
if (!m_database.isOpen())
return;
bool hasLayerForVerticalScrollbar() const;
bool hasLayerForScrollCorner() const;
+ virtual void sendWillRevealEdgeEventsIfNeeded(const IntPoint&, const IntPoint&) { }
+
private:
virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const;
void scrollPositionChanged(const IntPoint&);
#include "config.h"
#include "SQLiteDatabaseTracker.h"
+#include <mutex>
#include <wtf/NeverDestroyed.h>
-#include <wtf/StdLibExtras.h>
-#include <wtf/ThreadingPrimitives.h>
namespace WebCore {
namespace SQLiteDatabaseTracker {
-static SQLiteDatabaseTrackerClient* s_staticSQLiteDatabaseTrackerClient = 0;
+static SQLiteDatabaseTrackerClient* s_staticSQLiteDatabaseTrackerClient = nullptr;
static unsigned s_transactionInProgressCounter = 0;
-static Mutex& transactionInProgressMutex()
+static std::mutex& transactionInProgressMutex()
{
- static NeverDestroyed<Mutex> tipMutex;
+ static NeverDestroyed<std::mutex> tipMutex;
return tipMutex;
}
{
if (!s_staticSQLiteDatabaseTrackerClient)
return;
- MutexLocker lock(transactionInProgressMutex());
+
+ std::lock_guard<std::mutex> lock(transactionInProgressMutex());
s_transactionInProgressCounter++;
if (s_transactionInProgressCounter == 1)
{
if (!s_staticSQLiteDatabaseTrackerClient)
return;
- MutexLocker lock(transactionInProgressMutex());
+
+ std::lock_guard<std::mutex> lock(transactionInProgressMutex());
ASSERT(s_transactionInProgressCounter);
s_transactionInProgressCounter--;
{
return !s_staticSQLiteDatabaseTrackerClient || s_transactionInProgressCounter > 0;
}
-#endif // !ASSERT_DISABLED
+#endif
} // namespace SQLiteDatabaseTracker
#define SQLiteDatabaseTracker_h
#include "SQLiteDatabaseTrackerClient.h"
-#include <wtf/Noncopyable.h>
namespace WebCore {
#if !ASSERT_DISABLED
bool hasTransactionInProgress();
-#endif // !ASSERT_DISABLED
+#endif
};
#include "EventNames.h"
#include "FileSystem.h"
#include "HTMLElement.h"
+#include "SQLiteDatabaseTracker.h"
#include "SQLiteFileSystem.h"
#include "SQLiteStatement.h"
#include "SQLiteTransaction.h"
#include <wtf/MainThread.h>
#include <wtf/text/CString.h>
-#if PLATFORM(IOS)
-#include "SQLiteDatabaseTracker.h"
-#endif
-
namespace WebCore {
// If the StorageArea undergoes rapid changes, don't sync each change to disk.
ASSERT(!m_database.isOpen());
ASSERT(!m_databaseOpenFailed);
-#if PLATFORM(IOS)
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
String databaseFilename = m_syncManager->fullDatabaseFilename(m_databaseIdentifier);
if (!fileExists(databaseFilename) && openingStrategy == SkipIfNonExistent)
return;
}
-#if PLATFORM(IOS)
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
// If the clear flag is set, then we clear all items out before we write any new ones in.
if (clearItems) {
SQLiteStatement clear(m_database, "DELETE FROM ItemTable");
#include "DatabaseThread.h"
#include "FileSystem.h"
-#include "StorageThread.h"
#include "Logging.h"
#include "PageGroup.h"
+#include "SQLiteDatabaseTracker.h"
#include "SQLiteFileSystem.h"
#include "SQLiteStatement.h"
#include "SecurityOrigin.h"
+#include "StorageThread.h"
#include "StorageTrackerClient.h"
#include "TextEncoding.h"
#include <wtf/Functional.h>
#include <wtf/Vector.h>
#include <wtf/text/CString.h>
-#if PLATFORM(IOS)
-#include "SQLiteDatabaseTracker.h"
-#endif
-
namespace WebCore {
static StorageTracker* storageTracker = 0;
{
ASSERT(m_isActive);
ASSERT(!isMainThread());
-#if PLATFORM(IOS)
+
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
ASSERT(!m_databaseMutex.tryLock());
if (m_database.isOpen())
openTrackerDatabase(false);
if (m_database.isOpen()) {
-#if PLATFORM(IOS)
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
SQLiteStatement statement(m_database, "SELECT origin FROM Origins");
if (statement.prepare() != SQLResultOk) {
LOG_ERROR("Failed to prepare statement.");
void StorageTracker::syncFileSystemAndTrackerDatabase()
{
ASSERT(!isMainThread());
-#if PLATFORM(IOS)
+
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
+
ASSERT(m_isActive);
Vector<String> paths;
void StorageTracker::syncSetOriginDetails(const String& originIdentifier, const String& databaseFile)
{
ASSERT(!isMainThread());
-#if PLATFORM(IOS)
+
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
MutexLocker locker(m_databaseMutex);
void StorageTracker::syncDeleteAllOrigins()
{
ASSERT(!isMainThread());
-#if PLATFORM(IOS)
+
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
MutexLocker locker(m_databaseMutex);
void StorageTracker::syncDeleteOrigin(const String& originIdentifier)
{
ASSERT(!isMainThread());
-#if PLATFORM(IOS)
+
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
MutexLocker locker(m_databaseMutex);
if (!m_database.isOpen())
return String();
-#if PLATFORM(IOS)
SQLiteTransactionInProgressAutoCounter transactionCounter;
-#endif
SQLiteStatement pathStatement(m_database, "SELECT path FROM Origins WHERE origin=?");
if (pathStatement.prepare() != SQLResultOk) {