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,7 +627,7 @@ void CacheStorage::HasCache(const std::string& cache_name, ...@@ -627,7 +627,7 @@ void CacheStorage::HasCache(const std::string& cache_name,
scheduler_->WrapCallbackToRunNext(std::move(callback)))); scheduler_->WrapCallbackToRunNext(std::move(callback))));
} }
void CacheStorage::DeleteCache(const std::string& cache_name, void CacheStorage::DoomCache(const std::string& cache_name,
BoolAndErrorCallback callback) { BoolAndErrorCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK_CURRENTLY_ON(BrowserThread::IO);
...@@ -639,7 +639,7 @@ void CacheStorage::DeleteCache(const std::string& cache_name, ...@@ -639,7 +639,7 @@ void CacheStorage::DeleteCache(const std::string& cache_name,
storage::kStorageTypeTemporary); storage::kStorageTypeTemporary);
scheduler_->ScheduleOperation(base::BindOnce( scheduler_->ScheduleOperation(base::BindOnce(
&CacheStorage::DeleteCacheImpl, weak_factory_.GetWeakPtr(), cache_name, &CacheStorage::DoomCacheImpl, weak_factory_.GetWeakPtr(), cache_name,
scheduler_->WrapCallbackToRunNext(std::move(callback)))); scheduler_->WrapCallbackToRunNext(std::move(callback))));
} }
...@@ -900,7 +900,7 @@ void CacheStorage::HasCacheImpl(const std::string& cache_name, ...@@ -900,7 +900,7 @@ void CacheStorage::HasCacheImpl(const std::string& cache_name,
std::move(callback).Run(has_cache, CacheStorageError::kSuccess); std::move(callback).Run(has_cache, CacheStorageError::kSuccess);
} }
void CacheStorage::DeleteCacheImpl(const std::string& cache_name, void CacheStorage::DoomCacheImpl(const std::string& cache_name,
BoolAndErrorCallback callback) { BoolAndErrorCallback callback) {
CacheStorageCacheHandle cache_handle = GetLoadedCache(cache_name); CacheStorageCacheHandle cache_handle = GetLoadedCache(cache_name);
if (!cache_handle.value()) { if (!cache_handle.value()) {
......
...@@ -88,9 +88,7 @@ class CONTENT_EXPORT CacheStorage : public CacheStorageCacheObserver { ...@@ -88,9 +88,7 @@ class CONTENT_EXPORT CacheStorage : public CacheStorageCacheObserver {
// existing CacheStorageCacheHandle(s) to the cache will remain valid but // existing CacheStorageCacheHandle(s) to the cache will remain valid but
// future CacheStorage operations won't be able to access the cache. The cache // 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. // isn't actually erased from disk until the last handle is dropped.
// TODO(jkarlin): Rename to DoomCache. void DoomCache(const std::string& cache_name, BoolAndErrorCallback callback);
void DeleteCache(const std::string& cache_name,
BoolAndErrorCallback callback);
// Calls the callback with the cache index. // Calls the callback with the cache index.
void EnumerateCaches(IndexCallback callback); void EnumerateCaches(IndexCallback callback);
...@@ -175,7 +173,7 @@ class CONTENT_EXPORT CacheStorage : public CacheStorageCacheObserver { ...@@ -175,7 +173,7 @@ class CONTENT_EXPORT CacheStorage : public CacheStorageCacheObserver {
BoolAndErrorCallback callback); BoolAndErrorCallback callback);
// The DeleteCache callbacks are below. // The DeleteCache callbacks are below.
void DeleteCacheImpl(const std::string& cache_name, void DoomCacheImpl(const std::string& cache_name,
BoolAndErrorCallback callback); BoolAndErrorCallback callback);
void DeleteCacheDidWriteIndex(CacheStorageCacheHandle cache_handle, void DeleteCacheDidWriteIndex(CacheStorageCacheHandle cache_handle,
BoolAndErrorCallback callback, BoolAndErrorCallback callback,
......
...@@ -204,7 +204,7 @@ void CacheStorageManager::DeleteCache( ...@@ -204,7 +204,7 @@ void CacheStorageManager::DeleteCache(
DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK_CURRENTLY_ON(BrowserThread::IO);
CacheStorage* cache_storage = FindOrCreateCacheStorage(origin); CacheStorage* cache_storage = FindOrCreateCacheStorage(origin);
cache_storage->DeleteCache(cache_name, std::move(callback)); cache_storage->DoomCache(cache_name, std::move(callback));
} }
void CacheStorageManager::EnumerateCaches( 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