summaryrefslogtreecommitdiff
path: root/chromium/content/browser/browsing_data/storage_partition_code_cache_data_remover.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/browsing_data/storage_partition_code_cache_data_remover.cc')
-rw-r--r--chromium/content/browser/browsing_data/storage_partition_code_cache_data_remover.cc19
1 files changed, 4 insertions, 15 deletions
diff --git a/chromium/content/browser/browsing_data/storage_partition_code_cache_data_remover.cc b/chromium/content/browser/browsing_data/storage_partition_code_cache_data_remover.cc
index 973f8c1d7ab..df92e53f08f 100644
--- a/chromium/content/browser/browsing_data/storage_partition_code_cache_data_remover.cc
+++ b/chromium/content/browser/browsing_data/storage_partition_code_cache_data_remover.cc
@@ -55,16 +55,7 @@ void StoragePartitionCodeCacheDataRemover::Remove(
<< __func__ << " called with a null callback";
done_callback_ = std::move(done_callback);
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::IO},
- base::BindOnce(&StoragePartitionCodeCacheDataRemover::ClearJSCodeCache,
- base::Unretained(this)));
-}
-
-void StoragePartitionCodeCacheDataRemover::ClearedCodeCache() {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
- std::move(done_callback_).Run();
- base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
+ ClearJSCodeCache();
}
void StoragePartitionCodeCacheDataRemover::ClearCache(
@@ -140,11 +131,9 @@ void StoragePartitionCodeCacheDataRemover::ClearWASMCodeCache(int rv) {
// |rv| is the returned when clearing the code cache. We don't handle
// any errors here, so the result value is ignored.
void StoragePartitionCodeCacheDataRemover::DoneClearCodeCache(int rv) {
- // Notify the UI thread that we are done.
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::UI},
- base::BindOnce(&StoragePartitionCodeCacheDataRemover::ClearedCodeCache,
- base::Unretained(this)));
+ // Notify that we are done.
+ std::move(done_callback_).Run();
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
}
} // namespace content