Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1959)

Unified Diff: components/browsing_data/storage_partition_http_cache_data_remover.cc

Issue 2037843002: Remove use of deprecated MessageLoop methods in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change precache Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/browsing_data/storage_partition_http_cache_data_remover.cc
diff --git a/components/browsing_data/storage_partition_http_cache_data_remover.cc b/components/browsing_data/storage_partition_http_cache_data_remover.cc
index c262ddf5be242c9ad2b2e99c95f95df2a244d8f6..fabde8efbcfce6ca2636db93fa7c009b449be9de 100644
--- a/components/browsing_data/storage_partition_http_cache_data_remover.cc
+++ b/components/browsing_data/storage_partition_http_cache_data_remover.cc
@@ -4,6 +4,9 @@
#include "components/browsing_data/storage_partition_http_cache_data_remover.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "components/browsing_data/conditional_cache_deletion_helper.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h"
@@ -117,13 +120,13 @@ void StoragePartitionHttpCacheDataRemover::CountHttpCacheOnIOThread() {
void StoragePartitionHttpCacheDataRemover::ClearedHttpCache() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
done_callback_.Run();
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
}
void StoragePartitionHttpCacheDataRemover::CountedHttpCache() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
result_callback_.Run(calculation_result_);
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
}
// The expected state sequence is STATE_NONE --> STATE_CREATE_MAIN -->
« no previous file with comments | « components/browsing_data/conditional_cache_deletion_helper.cc ('k') | components/browsing_data_ui/history_notice_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698