re-use request context from IOThread

This commit is contained in:
deepak1556 2018-03-15 15:29:16 +09:00 committed by Aleksei Kuzmin
parent 97fcf7079b
commit c3f8f6bc42
5 changed files with 20 additions and 62 deletions

View file

@ -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);
};