Commit 215894f0 authored by zhuoyu.qian's avatar zhuoyu.qian Committed by Commit Bot

Rename DeleteCache to DoomCache.

As the comment in cache_storage.h by jkarlin@, rename DeleteCache to DoomCache.
Also rename DeleteCacheImpl to DoomCacheImpl.

BUG=
R=jkarlin@chromium.org
Signed-off-by: default avatarzhuoyu.qian <zhuoyu.qian@samsung.com>
Change-Id: I1cd75b0da724672ea0e746e749f47aa17e30e54d
Reviewed-on: https://chromium-review.googlesource.com/753204Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
Commit-Queue: srirama chandra sekhar <srirama.m@samsung.com>
Cr-Commit-Position: refs/heads/master@{#517386}
parent 27cc8dfa
......@@ -627,8 +627,8 @@ void CacheStorage::HasCache(const std::string& cache_name,
scheduler_->WrapCallbackToRunNext(std::move(callback))));
}
void CacheStorage::DeleteCache(const std::string& cache_name,
BoolAndErrorCallback callback) {
void CacheStorage::DoomCache(const std::string& cache_name,
BoolAndErrorCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!initialized_)
......@@ -639,7 +639,7 @@ void CacheStorage::DeleteCache(const std::string& cache_name,
storage::kStorageTypeTemporary);
scheduler_->ScheduleOperation(base::BindOnce(
&CacheStorage::DeleteCacheImpl, weak_factory_.GetWeakPtr(), cache_name,
&CacheStorage::DoomCacheImpl, weak_factory_.GetWeakPtr(), cache_name,
scheduler_->WrapCallbackToRunNext(std::move(callback))));
}
......@@ -900,8 +900,8 @@ void CacheStorage::HasCacheImpl(const std::string& cache_name,
std::move(callback).Run(has_cache, CacheStorageError::kSuccess);
}
void CacheStorage::DeleteCacheImpl(const std::string& cache_name,
BoolAndErrorCallback callback) {
void CacheStorage::DoomCacheImpl(const std::string& cache_name,
BoolAndErrorCallback callback) {
CacheStorageCacheHandle cache_handle = GetLoadedCache(cache_name);
if (!cache_handle.value()) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
......
......@@ -88,9 +88,7 @@ class CONTENT_EXPORT CacheStorage : public CacheStorageCacheObserver {
// existing CacheStorageCacheHandle(s) to the cache will remain valid but
// future CacheStorage operations won't be able to access the cache. The cache
// isn't actually erased from disk until the last handle is dropped.
// TODO(jkarlin): Rename to DoomCache.
void DeleteCache(const std::string& cache_name,
BoolAndErrorCallback callback);
void DoomCache(const std::string& cache_name, BoolAndErrorCallback callback);
// Calls the callback with the cache index.
void EnumerateCaches(IndexCallback callback);
......@@ -175,8 +173,8 @@ class CONTENT_EXPORT CacheStorage : public CacheStorageCacheObserver {
BoolAndErrorCallback callback);
// The DeleteCache callbacks are below.
void DeleteCacheImpl(const std::string& cache_name,
BoolAndErrorCallback callback);
void DoomCacheImpl(const std::string& cache_name,
BoolAndErrorCallback callback);
void DeleteCacheDidWriteIndex(CacheStorageCacheHandle cache_handle,
BoolAndErrorCallback callback,
bool success);
......
......@@ -204,7 +204,7 @@ void CacheStorageManager::DeleteCache(
DCHECK_CURRENTLY_ON(BrowserThread::IO);
CacheStorage* cache_storage = FindOrCreateCacheStorage(origin);
cache_storage->DeleteCache(cache_name, std::move(callback));
cache_storage->DoomCache(cache_name, std::move(callback));
}
void CacheStorageManager::EnumerateCaches(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment