| Index: net/url_request/url_request_context_builder.h
|
| diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h
|
| index 2a520017cae85457ef517e3a0daf942eba8e52dc..e4c77c66aa896fd69d75db0705cf7ac559ca2d81 100644
|
| --- a/net/url_request/url_request_context_builder.h
|
| +++ b/net/url_request/url_request_context_builder.h
|
| @@ -26,6 +26,7 @@
|
| #include "base/files/file_path.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/task_scheduler/task_traits.h"
|
| #include "build/build_config.h"
|
| #include "net/base/net_export.h"
|
| #include "net/base/network_delegate.h"
|
| @@ -42,6 +43,8 @@
|
|
|
| namespace base {
|
| class SingleThreadTaskRunner;
|
| +class SequencedTaskRunner;
|
| +class TaskRunner;
|
| }
|
|
|
| namespace net {
|
| @@ -325,8 +328,8 @@ class NET_EXPORT URLRequestContextBuilder {
|
| std::unique_ptr<CookieStore> cookie_store,
|
| std::unique_ptr<ChannelIDService> channel_id_service);
|
|
|
| - // Sets the task runner used to perform file operations. If not set, one will
|
| - // be created.
|
| + // Sets the task runner used to perform file operations. If not set,
|
| + // TaskSchedulers will be used instead.
|
| void SetFileTaskRunner(
|
| const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
|
|
|
| @@ -358,6 +361,16 @@ class NET_EXPORT URLRequestContextBuilder {
|
| NetworkDelegate* network_delegate,
|
| NetLog* net_log);
|
|
|
| + // Returns a TaskRunner with the specified traits. If |file_task_runner_| is
|
| + // non-NULL, uses that. Otherwise, uses base/task_scheduler/ and the specified
|
| + // traits.
|
| + scoped_refptr<base::TaskRunner> GetFileTaskRunner(
|
| + const base::TaskTraits& traits);
|
| + scoped_refptr<base::SequencedTaskRunner> GetFileSequencedTaskRunner(
|
| + const base::TaskTraits& traits);
|
| + scoped_refptr<base::SingleThreadTaskRunner> GetFileSingleThreadTaskRunner(
|
| + const base::TaskTraits& traits);
|
| +
|
| private:
|
| const char* name_;
|
| bool enable_brotli_;
|
|
|