Move away from BrowserThread::FILE

* Migrate TtsPlatformImplLinux away from using BrowserThread::FILE.
  https://chromium-review.googlesource.com/c/chromium/src/+/570022
* Move PdfConverter off the FILE thread.
  https://chromium-review.googlesource.com/c/chromium/src/+/592393
* https://chromium.googlesource.com/chromium/src/+/master/docs/task_scheduler_migration.md
This commit is contained in:
deepak1556 2018-04-09 14:46:52 +05:30 committed by Samuel Attard
parent 6d241e972b
commit e3c580e905
6 changed files with 124 additions and 100 deletions

View file

@ -11,6 +11,7 @@
#include "base/debug/leak_annotations.h"
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
#include "base/task_scheduler/post_task.h"
#include "chrome/browser/speech/tts_platform.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
@ -97,8 +98,8 @@ TtsPlatformImplLinux::TtsPlatformImplLinux() : utterance_id_(0) {
if (!command_line.HasSwitch(switches::kEnableSpeechDispatcher))
return;
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::PostTaskWithTraits(
FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
base::Bind(&TtsPlatformImplLinux::Initialize, base::Unretained(this)));
}