URLRequestContenxtGetter now accepts task runner
This commit is contained in:
parent
622fd8d1d7
commit
ac4ef926e1
3 changed files with 11 additions and 11 deletions
|
@ -140,8 +140,8 @@ net::URLRequestContextGetter* BrowserContext::CreateRequestContext(
|
|||
static_cast<NetLog*>(BrowserClient::Get()->GetNetLog()),
|
||||
GetPath(),
|
||||
in_memory_,
|
||||
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
|
||||
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
|
||||
protocol_handlers,
|
||||
std::move(protocol_interceptors));
|
||||
resource_context_->set_url_request_context_getter(url_request_getter_.get());
|
||||
|
|
|
@ -118,8 +118,8 @@ URLRequestContextGetter::URLRequestContextGetter(
|
|||
NetLog* net_log,
|
||||
const base::FilePath& base_path,
|
||||
bool in_memory,
|
||||
base::MessageLoop* io_loop,
|
||||
base::MessageLoop* file_loop,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector protocol_interceptors)
|
||||
: delegate_(delegate),
|
||||
|
@ -127,8 +127,8 @@ URLRequestContextGetter::URLRequestContextGetter(
|
|||
net_log_(net_log),
|
||||
base_path_(base_path),
|
||||
in_memory_(in_memory),
|
||||
io_loop_(io_loop),
|
||||
file_loop_(file_loop),
|
||||
io_task_runner_(io_task_runner),
|
||||
file_task_runner_(file_task_runner),
|
||||
protocol_interceptors_(std::move(protocol_interceptors)),
|
||||
job_factory_(nullptr) {
|
||||
// Must first be created on the UI thread.
|
||||
|
@ -144,7 +144,7 @@ URLRequestContextGetter::URLRequestContextGetter(
|
|||
// must synchronously run on the glib message loop. This will be passed to
|
||||
// the URLRequestContextStorage on the IO thread in GetURLRequestContext().
|
||||
proxy_config_service_ = net::ProxyService::CreateSystemProxyConfigService(
|
||||
io_loop_->task_runner(), file_loop_->task_runner());
|
||||
io_task_runner_, file_task_runner_);
|
||||
}
|
||||
|
||||
URLRequestContextGetter::~URLRequestContextGetter() {
|
||||
|
|
|
@ -67,8 +67,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
|
|||
NetLog* net_log,
|
||||
const base::FilePath& base_path,
|
||||
bool in_memory,
|
||||
base::MessageLoop* io_loop,
|
||||
base::MessageLoop* file_loop,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector protocol_interceptors);
|
||||
virtual ~URLRequestContextGetter();
|
||||
|
@ -90,8 +90,8 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
|
|||
NetLog* net_log_;
|
||||
base::FilePath base_path_;
|
||||
bool in_memory_;
|
||||
base::MessageLoop* io_loop_;
|
||||
base::MessageLoop* file_loop_;
|
||||
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
|
||||
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
|
||||
|
||||
std::string user_agent_;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue