re-use request context from IOThread
This commit is contained in:
parent
97fcf7079b
commit
c3f8f6bc42
5 changed files with 20 additions and 62 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
namespace net {
|
||||
class URLRequestContext;
|
||||
class URLRequestContextGetter;
|
||||
}
|
||||
|
||||
namespace brightray {
|
||||
|
@ -21,6 +22,10 @@ class IOThread : public content::BrowserThreadDelegate {
|
|||
IOThread();
|
||||
~IOThread() override;
|
||||
|
||||
net::URLRequestContextGetter* GetRequestContext() {
|
||||
return url_request_context_getter_;
|
||||
}
|
||||
|
||||
protected:
|
||||
// BrowserThreadDelegate Implementation, runs on the IO thread.
|
||||
void Init() override;
|
||||
|
@ -28,6 +33,7 @@ class IOThread : public content::BrowserThreadDelegate {
|
|||
|
||||
private:
|
||||
std::unique_ptr<net::URLRequestContext> url_request_context_;
|
||||
net::URLRequestContextGetter* url_request_context_getter_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(IOThread);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue