blob: d35b021e30f9bf08f28fb81de4c1d8d7b5794ea1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// 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 "base/basictypes.h"
#include "base/memory/scoped_ptr.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:
URLRequestContextGetter(
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
// Overridden from net::URLRequestContextGetter:
virtual net::URLRequestContext* GetURLRequestContext() override;
virtual scoped_refptr<base::SingleThreadTaskRunner>
GetNetworkTaskRunner() const override;
protected:
virtual ~URLRequestContextGetter();
private:
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
scoped_ptr<net::ProxyConfigService> proxy_config_service_;
scoped_ptr<net::URLRequestContext> url_request_context_;
DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter);
};
} // namespace remoting
#endif // REMOTING_BASE_URL_REQUEST_CONTEXT_GETTER_H_
|