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

Unified Diff: chrome/browser/ui/webui/chromeos/image_source.cc

Issue 1117543003: [chrome/browser/ui] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build break Created 5 years, 8 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
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/image_source.cc
diff --git a/chrome/browser/ui/webui/chromeos/image_source.cc b/chrome/browser/ui/webui/chromeos/image_source.cc
index 698e697fce7b2943454042464e0f950a9b326caf..d45c0c9c5865a7d26eee475f5cb9f50a266316cc 100644
--- a/chrome/browser/ui/webui/chromeos/image_source.cc
+++ b/chrome/browser/ui/webui/chromeos/image_source.cc
@@ -9,6 +9,8 @@
#include "base/location.h"
#include "base/memory/ref_counted_memory.h"
#include "base/sequenced_task_runner.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/chromeos/login/users/avatar/user_image_loader.h"
#include "chrome/common/url_constants.h"
#include "components/user_manager/user_image/user_image.h"
@@ -41,7 +43,7 @@ void StartOnBlockingPool(
const std::string& path,
scoped_refptr<UserImageLoader> image_loader,
const content::URLDataSource::GotDataCallback& got_data_callback,
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy) {
+ scoped_refptr<base::SingleThreadTaskRunner> thread_task_runner) {
DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
const base::FilePath asset_dir(FILE_PATH_LITERAL(chrome::kChromeOSAssetPath));
@@ -50,7 +52,7 @@ void StartOnBlockingPool(
image_loader->Start(image_path.value(), 0,
base::Bind(&ImageLoaded, got_data_callback));
} else {
- message_loop_proxy->PostTask(FROM_HERE,
+ thread_task_runner->PostTask(FROM_HERE,
base::Bind(got_data_callback, nullptr));
}
}
@@ -93,7 +95,7 @@ void ImageSource::StartDataRequest(
path,
image_loader_,
got_data_callback,
- base::MessageLoopProxy::current()));
+ base::ThreadTaskRunnerHandle::Get()));
}
std::string ImageSource::GetMimeType(const std::string& path) const {
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698