Bug 1110485 P7 Rename DeleteCache() to DeleteCacheId() better distinguish it from CacheDelete(). r=ehsan

This commit is contained in:
Ben Kelly 2015-04-14 12:21:14 -07:00
parent 2b8b6dd1ab
commit 11bf5560b6
3 changed files with 8 additions and 9 deletions

View File

@ -359,7 +359,7 @@ InitializeConnection(mozIStorageConnection* aConn)
}
nsresult
CreateCache(mozIStorageConnection* aConn, CacheId* aCacheIdOut)
CreateCacheId(mozIStorageConnection* aConn, CacheId* aCacheIdOut)
{
MOZ_ASSERT(!NS_IsMainThread());
MOZ_ASSERT(aConn);
@ -388,8 +388,8 @@ CreateCache(mozIStorageConnection* aConn, CacheId* aCacheIdOut)
}
nsresult
DeleteCache(mozIStorageConnection* aConn, CacheId aCacheId,
nsTArray<nsID>& aDeletedBodyIdListOut)
DeleteCacheId(mozIStorageConnection* aConn, CacheId aCacheId,
nsTArray<nsID>& aDeletedBodyIdListOut)
{
MOZ_ASSERT(!NS_IsMainThread());
MOZ_ASSERT(aConn);

View File

@ -36,12 +36,11 @@ nsresult
InitializeConnection(mozIStorageConnection* aConn);
nsresult
CreateCache(mozIStorageConnection* aConn, CacheId* aCacheIdOut);
CreateCacheId(mozIStorageConnection* aConn, CacheId* aCacheIdOut);
// TODO: improve naming (confusing with CacheDelete) (bug 1110485)
nsresult
DeleteCache(mozIStorageConnection* aConn, CacheId aCacheId,
nsTArray<nsID>& aDeletedBodyIdListOut);
DeleteCacheId(mozIStorageConnection* aConn, CacheId aCacheId,
nsTArray<nsID>& aDeletedBodyIdListOut);
// TODO: Consider removing unused IsCacheOrphaned after writing cleanup code. (bug 1110446)
nsresult

View File

@ -457,7 +457,7 @@ public:
mozStorageTransaction trans(aConn, false,
mozIStorageConnection::TRANSACTION_IMMEDIATE);
nsresult rv = db::DeleteCache(aConn, mCacheId, mDeletedBodyIdList);
nsresult rv = db::DeleteCacheId(aConn, mCacheId, mDeletedBodyIdList);
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
rv = trans.Commit();
@ -1218,7 +1218,7 @@ public:
return rv;
}
rv = db::CreateCache(aConn, &mCacheId);
rv = db::CreateCacheId(aConn, &mCacheId);
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
rv = db::StoragePutCache(aConn, mNamespace, mArgs.key(), mCacheId);