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

Unified Diff: chrome/browser/mac/keystone_glue.mm

Issue 2525483006: Use TaskScheduler instead of WorkerPool in keystone_glue.mm. (Closed)
Patch Set: CONITNUE_ON_SHUTDOWN Created 4 years, 1 month 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 | « no previous file | chrome/browser/mac/keystone_glue_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/mac/keystone_glue.mm
diff --git a/chrome/browser/mac/keystone_glue.mm b/chrome/browser/mac/keystone_glue.mm
index 0f24776fd72a5c0a2d1da4833f1496a56f2f9194..0b1f65659adbba62ea794b3cb7672a2d424e879d 100644
--- a/chrome/browser/mac/keystone_glue.mm
+++ b/chrome/browser/mac/keystone_glue.mm
@@ -21,7 +21,7 @@
#include "base/memory/ref_counted.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/sys_string_conversions.h"
-#include "base/threading/worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "build/build_config.h"
#import "chrome/browser/mac/keystone_registration.h"
#include "chrome/common/channel_info.h"
@@ -60,8 +60,7 @@ NSString* SystemBrandFilePath() {
return [kBrandSystemFile stringByStandardizingPath];
}
-// Adaptor for scheduling an Objective-C method call on a |WorkerPool|
-// thread.
+// Adaptor for scheduling an Objective-C method call in TaskScheduler.
class PerformBridge : public base::RefCountedThreadSafe<PerformBridge> {
public:
@@ -72,8 +71,13 @@ class PerformBridge : public base::RefCountedThreadSafe<PerformBridge> {
DCHECK(sel);
scoped_refptr<PerformBridge> op = new PerformBridge(target, sel, arg);
- base::WorkerPool::PostTask(
- FROM_HERE, base::Bind(&PerformBridge::Run, op.get()), true);
+ base::PostTaskWithTraits(
+ FROM_HERE, base::TaskTraits()
+ .WithFileIO()
+ .WithPriority(base::TaskPriority::BACKGROUND)
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
Mark Mentovai 2016/11/29 21:56:06 Revise change description to match this.
fdoray 2016/11/30 19:25:21 Done.
+ base::Bind(&PerformBridge::Run, op.get()));
}
// Convenience for the no-argument case.
« no previous file with comments | « no previous file | chrome/browser/mac/keystone_glue_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698