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

Unified Diff: chrome/browser/icon_loader_win.cc

Issue 2953633002: Move the IconLoader to use the task scheduler. (Closed)
Patch Set: sky Created 3 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
« no previous file with comments | « chrome/browser/icon_loader_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/icon_loader_win.cc
diff --git a/chrome/browser/icon_loader_win.cc b/chrome/browser/icon_loader_win.cc
index 035c759e42bf6a19c5ddd051d94bdad3c9a87ed9..1d0912bd51850f3e3409353c34f883fe939dc6cd 100644
--- a/chrome/browser/icon_loader_win.cc
+++ b/chrome/browser/icon_loader_win.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/thread.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/display/win/dpi.h"
@@ -30,8 +31,10 @@ IconLoader::IconGroup IconLoader::GroupForFilepath(
}
// static
-content::BrowserThread::ID IconLoader::ReadIconThreadID() {
- return content::BrowserThread::FILE;
+scoped_refptr<base::TaskRunner> IconLoader::GetReadIconTaskRunner() {
+ // Technically speaking, only a thread with COM is needed, not one that has
+ // a COM STA. However, this is what is available for now.
+ return base::CreateCOMSTATaskRunnerWithTraits(traits());
}
void IconLoader::ReadIcon() {
« no previous file with comments | « chrome/browser/icon_loader_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698