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

Unified Diff: components/dom_distiller/core/distiller.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/dom_distiller/core/distiller.cc
diff --git a/components/dom_distiller/core/distiller.cc b/components/dom_distiller/core/distiller.cc
index f8605162e418205080af4ccda6a4801d071fd449..75e6047895845806524db40d6c6719d7d78cc1d8 100644
--- a/components/dom_distiller/core/distiller.cc
+++ b/components/dom_distiller/core/distiller.cc
@@ -12,10 +12,11 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/location.h"
-#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/values.h"
#include "components/dom_distiller/core/distiller_page.h"
#include "components/dom_distiller/core/distiller_url_fetcher.h"
@@ -319,7 +320,7 @@ void DistillerImpl::OnFetchImageDone(int page_num,
// Delete the |url_fetcher| by DeleteSoon since the OnFetchImageDone
// callback is invoked by the |url_fetcher|.
page_data->image_fetchers_.weak_erase(fetcher_it);
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, url_fetcher);
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, url_fetcher);
DistilledPageProto_Image* image =
page_data->distilled_page_proto->data.add_image();

Powered by Google App Engine
This is Rietveld 408576698