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

Unified Diff: media/audio/audio_debug_file_writer.h

Issue 2885173002: Make AudioDebugFileWriter create its own file worker thread. (Closed)
Patch Set: Remove useless include Created 3 years, 7 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 | « content/browser/speech/speech_recognizer_impl.cc ('k') | media/audio/audio_debug_file_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_debug_file_writer.h
diff --git a/media/audio/audio_debug_file_writer.h b/media/audio/audio_debug_file_writer.h
index e938ba5098e1ca1027d78bbf6539864f7ed4533c..e8d82a95a29b5f12f1910ad2580a0cc6f29c59ac 100644
--- a/media/audio/audio_debug_file_writer.h
+++ b/media/audio/audio_debug_file_writer.h
@@ -14,7 +14,7 @@
#include "base/memory/ref_counted.h"
#include "base/sequence_checker.h"
#include "base/sequenced_task_runner.h"
-#include "base/single_thread_task_runner.h"
+#include "base/task_scheduler/post_task.h"
#include "media/base/audio_parameters.h"
#include "media/base/media_export.h"
@@ -30,9 +30,7 @@ class MEDIA_EXPORT AudioDebugFileWriter {
// Number of channels and sample rate are used from |params|, the other
// parameters are ignored. The number of channels in the data passed to
// Write() must match |params|.
- AudioDebugFileWriter(
- const AudioParameters& params,
- scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
+ AudioDebugFileWriter(const AudioParameters& params);
virtual ~AudioDebugFileWriter();
@@ -86,7 +84,9 @@ class MEDIA_EXPORT AudioDebugFileWriter {
base::SequenceChecker client_sequence_checker_;
// The task runner to do file output operations on.
- scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
+ const scoped_refptr<base::SequencedTaskRunner> file_task_runner_ =
+ base::CreateSequencedTaskRunnerWithTraits(
+ {base::MayBlock(), base::TaskPriority::BACKGROUND});
DISALLOW_COPY_AND_ASSIGN(AudioDebugFileWriter);
};
« no previous file with comments | « content/browser/speech/speech_recognizer_impl.cc ('k') | media/audio/audio_debug_file_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698