| // Copyright 2014 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #ifndef REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_ |
| #define REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_ |
| |
| #include <memory> |
| |
| #include "base/macros.h" |
| #include "net/url_request/url_request_context_getter.h" |
| |
| namespace base { |
| class SingleThreadTaskRunner; |
| } // namespace base |
| |
| namespace net { |
| class ProxyConfigService; |
| } // namespace net |
| |
| namespace remoting { |
| |
| class URLRequestContextGetter : public net::URLRequestContextGetter { |
| public: |
| explicit URLRequestContextGetter( |
| scoped_refptr<base::SingleThreadTaskRunner> network_task_runner); |
| |
| // Overridden from net::URLRequestContextGetter: |
| net::URLRequestContext* GetURLRequestContext() override; |
| scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() |
| const override; |
| |
| protected: |
| ~URLRequestContextGetter() override; |
| |
| private: |
| scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; |
| std::unique_ptr<net::ProxyConfigService> proxy_config_service_; |
| std::unique_ptr<net::URLRequestContext> url_request_context_; |
| |
| DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter); |
| }; |
| |
| } // namespace remoting |
| |
| #endif // REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_ |