Make AudioDebugFileWriter::AudioFileWriter use a SequencedTaskRunner

Quoting gab@ from https://codereview.chromium.org/2885173002/diff/40001/media/audio/audio_debug_file_writer.h:

AudioFileWriter::AudioFileWriter() merely takes the task runner to assert it's
running on it, that can easily be turned into a SequencedTaskRunner but even
better than that would be to have it use a SequenceChecker to check that all of
its methods run in sequence (will need to DetachFromSequence in
AudioFileWriter::AudioFileWriter() as it's not constructed on same sequence it's
used -- see sequence_checker.h for details).

SequenceChecker + implicit AssertIOAllowed() calls from using base file methods
guarantees this class is being used in sequence with MayBlock() trait. That's
preferred and cleaner than taking a task_runner just to assume running on it.

Then there's OnThreadDeleter which could easily be made OnSequenceDeleter +
SequenceTaskRunner.

BUG=689520
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2891983002
Cr-Commit-Position: refs/heads/master@{#473264}
2 files changed