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

Unified Diff: chrome/browser/icon_loader_mac.mm

Issue 2953633002: Move the IconLoader to use the task scheduler. (Closed)
Patch Set: simpler 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
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..123a7f2792dd450b744ada9f178b2b075db10522 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::ReadIconTaskRunner() {
+ // NSWorkspace is thread-safe.
+ return base::CreateTaskRunnerWithTraits(traits());
}
void IconLoader::ReadIcon() {

Powered by Google App Engine
This is Rietveld 408576698