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