Remove the dependence on BrowserThread::FILE for

https://codereview.chromium.org/2944313003
This commit is contained in:
Aleksei Kuzmin 2017-08-23 21:55:46 +03:00 committed by Cheng Zhao
parent b29c485ec4
commit 6c7ad3ac58
5 changed files with 2 additions and 9 deletions

View file

@ -29,8 +29,7 @@ class GeoURLRequestContextGetter : public net::URLRequestContextGetter {
net::URLRequestContextBuilder builder; net::URLRequestContextBuilder builder;
builder.set_proxy_config_service( builder.set_proxy_config_service(
net::ProxyService::CreateSystemProxyConfigService( net::ProxyService::CreateSystemProxyConfigService(
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)));
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
url_request_context_ = builder.Build(); url_request_context_ = builder.Build();
} }
return url_request_context_.get(); return url_request_context_.get();

View file

@ -98,7 +98,6 @@ void URLRequestFetchJob::BeforeStartInUI(
url_request_context_getter_ = new brightray::URLRequestContextGetter( url_request_context_getter_ = new brightray::URLRequestContextGetter(
this, nullptr, nullptr, base::FilePath(), true, this, nullptr, nullptr, base::FilePath(), true,
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
nullptr, content::URLRequestInterceptorScopedVector()); nullptr, content::URLRequestInterceptorScopedVector());
} else { } else {
mate::Handle<api::Session> session; mate::Handle<api::Session> session;

View file

@ -134,7 +134,6 @@ net::URLRequestContextGetter* BrowserContext::CreateRequestContext(
GetPath(), GetPath(),
in_memory_, in_memory_,
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
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());

View file

@ -130,7 +130,6 @@ URLRequestContextGetter::URLRequestContextGetter(
const base::FilePath& base_path, const base::FilePath& base_path,
bool in_memory, bool in_memory,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
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),
@ -139,7 +138,6 @@ URLRequestContextGetter::URLRequestContextGetter(
base_path_(base_path), base_path_(base_path),
in_memory_(in_memory), in_memory_(in_memory),
io_task_runner_(io_task_runner), io_task_runner_(io_task_runner),
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.
@ -155,7 +153,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_task_runner_, file_task_runner_); io_task_runner_);
} }
URLRequestContextGetter::~URLRequestContextGetter() { URLRequestContextGetter::~URLRequestContextGetter() {

View file

@ -66,7 +66,6 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
const base::FilePath& base_path, const base::FilePath& base_path,
bool in_memory, bool in_memory,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
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();
@ -87,7 +86,6 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
base::FilePath base_path_; base::FilePath base_path_;
bool in_memory_; bool in_memory_;
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
std::string user_agent_; std::string user_agent_;