protocol: create separate request context for fetch job
This commit is contained in:
parent
652843f447
commit
8eb87c5d2b
6 changed files with 22 additions and 16 deletions
|
@ -132,7 +132,7 @@ class CustomProtocolRequestJob : public AdapterRequestJob {
|
|||
|
||||
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
|
||||
base::Bind(&AdapterRequestJob::CreateHttpJobAndStart, GetWeakPtr(),
|
||||
registry_->browser_context(), url, method, referrer));
|
||||
url, method, referrer));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -211,8 +211,7 @@ std::string ConvertErrorCode(int error_code) {
|
|||
} // namespace
|
||||
|
||||
Protocol::Protocol(AtomBrowserContext* browser_context)
|
||||
: browser_context_(browser_context),
|
||||
job_factory_(browser_context->job_factory()) {
|
||||
: job_factory_(browser_context->job_factory()) {
|
||||
CHECK(job_factory_);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,8 +46,6 @@ class Protocol : public mate::EventEmitter {
|
|||
|
||||
JsProtocolHandler GetProtocolHandler(const std::string& scheme);
|
||||
|
||||
AtomBrowserContext* browser_context() const { return browser_context_; }
|
||||
|
||||
protected:
|
||||
explicit Protocol(AtomBrowserContext* browser_context);
|
||||
|
||||
|
@ -94,7 +92,6 @@ class Protocol : public mate::EventEmitter {
|
|||
const JsProtocolHandler& handler);
|
||||
int UninterceptProtocolInIO(const std::string& scheme);
|
||||
|
||||
AtomBrowserContext* browser_context_;
|
||||
AtomURLRequestJobFactory* job_factory_;
|
||||
ProtocolHandlersMap protocol_handlers_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue