[WIP] refactor: (Part I) make the ownership of URLRequestContextGetter more clear (#13956)
* refactor: desttroy URLRequestContextGetter on IO thread * Accepts a factory class that can customize the creation of URLRequestContext * Use a separate request context for media which is derived from the default * Notify URLRequestContextGetter observers and cleanup on IO thread * Move most of brightray net/ classes into atom net/ * refactor: remove refs to URLRequestContextGetter on shutdown * refactor: remove brigtray switches.{cc|h} * refactor: remove brightray network_delegate.{cc|h} * refactor: make AtomURLRequestJobFactory the top level factory. * Allows to use the default handler from content/ for http{s}, ws{s} schemes. * Removes the storage of job factory in URLRequestContextGetter.
This commit is contained in:
parent
cb4b3e7be0
commit
1c0bb06d4a
34 changed files with 985 additions and 1121 deletions
|
@ -1,22 +0,0 @@
|
|||
// Copyright (c) 2015 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "atom/browser/net/http_protocol_handler.h"
|
||||
|
||||
#include "net/url_request/url_request_http_job.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
HttpProtocolHandler::HttpProtocolHandler(const std::string& scheme)
|
||||
: scheme_(scheme) {}
|
||||
|
||||
HttpProtocolHandler::~HttpProtocolHandler() {}
|
||||
|
||||
net::URLRequestJob* HttpProtocolHandler::MaybeCreateJob(
|
||||
net::URLRequest* request,
|
||||
net::NetworkDelegate* network_delegate) const {
|
||||
return net::URLRequestHttpJob::Factory(request, network_delegate, scheme_);
|
||||
}
|
||||
|
||||
} // namespace atom
|
Loading…
Add table
Add a link
Reference in a new issue