1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_
6 #define REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop/message_loop.h"
13 #include "net/proxy/proxy_config_service.h"
14 #include "net/url_request/url_request_context.h"
15 #include "net/url_request/url_request_context_getter.h"
16 #include "net/url_request/url_request_context_storage.h"
19 class MessageLoopProxy
;
24 class URLRequestContextGetter
: public net::URLRequestContextGetter
{
26 URLRequestContextGetter(
27 scoped_refptr
<base::SingleThreadTaskRunner
> network_task_runner
);
29 // Overridden from net::URLRequestContextGetter:
30 virtual net::URLRequestContext
* GetURLRequestContext() OVERRIDE
;
31 virtual scoped_refptr
<base::SingleThreadTaskRunner
>
32 GetNetworkTaskRunner() const OVERRIDE
;
35 virtual ~URLRequestContextGetter();
38 scoped_refptr
<base::SingleThreadTaskRunner
> network_task_runner_
;
39 scoped_ptr
<net::ProxyConfigService
> proxy_config_service_
;
40 scoped_ptr
<net::URLRequestContext
> url_request_context_
;
42 DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter
);
45 } // namespace remoting
47 #endif // REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_