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

Unified Diff: chrome/browser/icon_loader_mac.mm

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_chromeos.cc ('k') | chrome/browser/icon_loader_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/icon_loader_mac.mm
diff --git a/chrome/browser/icon_loader_mac.mm b/chrome/browser/icon_loader_mac.mm
index 392f2b22b2535953baf0b4b6b1f66e169aec7f91..f10b47d27a6e58d3ce7978ea148a1cc8224b6b8f 100644
--- a/chrome/browser/icon_loader_mac.mm
+++ b/chrome/browser/icon_loader_mac.mm
@@ -11,6 +11,7 @@
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/sys_string_conversions.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/thread.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_util_mac.h"
@@ -22,8 +23,9 @@ IconLoader::IconGroup IconLoader::GroupForFilepath(
}
// static
-content::BrowserThread::ID IconLoader::ReadIconThreadID() {
- return content::BrowserThread::FILE;
+scoped_refptr<base::TaskRunner> IconLoader::GetReadIconTaskRunner() {
+ // NSWorkspace is thread-safe.
+ return base::CreateTaskRunnerWithTraits(traits());
}
void IconLoader::ReadIcon() {
« no previous file with comments | « chrome/browser/icon_loader_chromeos.cc ('k') | chrome/browser/icon_loader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698