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..526ff1f9f0314efdfa5d902d54d41bed722122fe 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,15 @@ 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. |
Randy Smith (Not in Mondays)
2017/06/21 12:56:26
I also find myself wondering if names that capture
Randy Smith (Not in Mondays)
2017/06/21 12:56:26
nit, suggestion: It bothers me a little that we're
mmenke
2017/06/21 15:13:56
I'm open to other ideas. Largely I just wanted re
mmenke
2017/06/21 15:13:56
Done. I didn't do this in the first place mostly
|
+ scoped_refptr<base::TaskRunner> GetTaskRunner(const base::TaskTraits& traits); |
+ scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner( |
+ const base::TaskTraits& traits); |
+ scoped_refptr<base::SingleThreadTaskRunner> GetSingleThreadTaskRunner( |
+ const base::TaskTraits& traits); |
+ |
private: |
const char* name_; |
bool enable_brotli_; |
@@ -381,6 +393,7 @@ class NET_EXPORT URLRequestContextBuilder { |
bool cookie_store_set_by_client_; |
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; |
+ |
HttpCacheParams http_cache_params_; |
HttpNetworkSession::Params http_network_session_params_; |
base::FilePath transport_security_persister_path_; |