Commit 86b5a0e1 authored by Etienne Pierre-doray's avatar Etienne Pierre-doray Committed by Commit Bot

[MessageLoop]: Replace MessageLoopCurrent::task_runner() in /chrome/browser/web_applications.

MessageLoopCurrent::task_runner() is depecated.
This CL replaces it with with ThreadTaskRunnerHandle::Get().
A small step towards deleting MessageLoop.

This CL was generated with git cl split.
Refer to the top-level CL if necessary :
https://chromium-review.googlesource.com/c/chromium/src/+/1631693

Please CQ if LGTY!

This CL was uploaded by git cl split.

R=tapted@chromium.org

Bug: 616447
Change-Id: Ia48bfa92137742c563fd65418ed661da111ba354
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1635625
Auto-Submit: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665070}
parent 2bb500a5
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
#include "chrome/browser/web_applications/components/web_app_icon_downloader.h" #include "chrome/browser/web_applications/components/web_app_icon_downloader.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/message_loop/message_loop_current.h"
#include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_functions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/web_applications/components/web_app_helpers.h" #include "chrome/browser/web_applications/components/web_app_helpers.h"
#include "components/favicon/content/content_favicon_driver.h" #include "components/favicon/content/content_favicon_driver.h"
#include "content/public/browser/navigation_handle.h" #include "content/public/browser/navigation_handle.h"
...@@ -99,7 +99,7 @@ void WebAppIconDownloader::FetchIcons(const std::vector<GURL>& urls) { ...@@ -99,7 +99,7 @@ void WebAppIconDownloader::FetchIcons(const std::vector<GURL>& urls) {
// If no downloads were initiated, we can proceed directly to running the // If no downloads were initiated, we can proceed directly to running the
// callback. // callback.
if (in_progress_requests_.empty() && !need_favicon_urls_) { if (in_progress_requests_.empty() && !need_favicon_urls_) {
base::MessageLoopCurrent::Get()->task_runner()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(std::move(callback_), true, icons_map_)); FROM_HERE, base::BindOnce(std::move(callback_), true, icons_map_));
} }
} }
......
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