OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_SERVICES_NETWORK_NETWORK_CONTEXT_H_ | 5 #ifndef MOJO_SERVICES_NETWORK_NETWORK_CONTEXT_H_ |
6 #define MOJO_SERVICES_NETWORK_NETWORK_CONTEXT_H_ | 6 #define MOJO_SERVICES_NETWORK_NETWORK_CONTEXT_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
9 #include "base/threading/thread.h" | |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 class FilePath; | 12 class FilePath; |
13 } | 13 } |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 class NetLog; | |
17 class URLRequestContext; | 16 class URLRequestContext; |
18 class URLRequestContextStorage; | |
19 class TransportSecurityPersister; | |
20 } | 17 } |
21 | 18 |
22 namespace mojo { | 19 namespace mojo { |
23 | 20 |
24 class NetworkContext { | 21 class NetworkContext { |
25 public: | 22 public: |
26 explicit NetworkContext(const base::FilePath& base_path); | 23 explicit NetworkContext(const base::FilePath& base_path); |
27 ~NetworkContext(); | 24 ~NetworkContext(); |
28 | 25 |
29 net::URLRequestContext* url_request_context() { | 26 net::URLRequestContext* url_request_context() { |
30 return url_request_context_.get(); | 27 return url_request_context_.get(); |
31 } | 28 } |
32 | 29 |
33 private: | 30 private: |
34 base::Thread file_thread_; | |
35 base::Thread cache_thread_; | |
36 scoped_ptr<net::NetLog> net_log_; | |
37 scoped_ptr<net::URLRequestContextStorage> storage_; | |
38 scoped_ptr<net::URLRequestContext> url_request_context_; | 31 scoped_ptr<net::URLRequestContext> url_request_context_; |
39 scoped_ptr<net::TransportSecurityPersister> transport_security_persister_; | |
40 | 32 |
41 DISALLOW_COPY_AND_ASSIGN(NetworkContext); | 33 DISALLOW_COPY_AND_ASSIGN(NetworkContext); |
42 }; | 34 }; |
43 | 35 |
44 } // namespace mojo | 36 } // namespace mojo |
45 | 37 |
46 #endif // MOJO_SERVICES_NETWORK_NETWORK_CONTEXT_H_ | 38 #endif // MOJO_SERVICES_NETWORK_NETWORK_CONTEXT_H_ |
OLD | NEW |