OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 5 #ifndef CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ |
6 #define CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 6 #define CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 namespace content { | 24 namespace content { |
25 | 25 |
26 class ShellURLRequestContextGetter : public net::URLRequestContextGetter { | 26 class ShellURLRequestContextGetter : public net::URLRequestContextGetter { |
27 public: | 27 public: |
28 ShellURLRequestContextGetter( | 28 ShellURLRequestContextGetter( |
29 bool ignore_certificate_errors, | 29 bool ignore_certificate_errors, |
30 const FilePath& base_path, | 30 const FilePath& base_path, |
31 MessageLoop* io_loop, | 31 MessageLoop* io_loop, |
32 MessageLoop* file_loop); | 32 MessageLoop* file_loop); |
33 | 33 |
| 34 void StartTearDown(); |
| 35 |
34 // net::URLRequestContextGetter implementation. | 36 // net::URLRequestContextGetter implementation. |
35 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; | 37 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; |
36 virtual scoped_refptr<base::SingleThreadTaskRunner> | 38 virtual scoped_refptr<base::SingleThreadTaskRunner> |
37 GetNetworkTaskRunner() const OVERRIDE; | 39 GetNetworkTaskRunner() const OVERRIDE; |
38 | 40 |
39 net::HostResolver* host_resolver(); | 41 net::HostResolver* host_resolver(); |
40 | 42 |
41 protected: | 43 protected: |
42 virtual ~ShellURLRequestContextGetter(); | 44 virtual ~ShellURLRequestContextGetter(); |
43 | 45 |
44 private: | 46 private: |
45 bool ignore_certificate_errors_; | 47 bool ignore_certificate_errors_; |
46 FilePath base_path_; | 48 FilePath base_path_; |
47 MessageLoop* io_loop_; | 49 MessageLoop* io_loop_; |
48 MessageLoop* file_loop_; | 50 MessageLoop* file_loop_; |
49 | 51 |
50 scoped_ptr<net::ProxyConfigService> proxy_config_service_; | |
51 scoped_ptr<net::NetworkDelegate> network_delegate_; | 52 scoped_ptr<net::NetworkDelegate> network_delegate_; |
52 scoped_ptr<net::URLRequestContextStorage> storage_; | 53 scoped_ptr<net::URLRequestContextStorage> storage_; |
53 scoped_ptr<net::URLRequestContext> url_request_context_; | 54 scoped_ptr<net::URLRequestContext> url_request_context_; |
54 scoped_ptr<net::MappedHostResolver> mapped_host_resolver_; | 55 scoped_ptr<net::MappedHostResolver> mapped_host_resolver_; |
55 | 56 |
56 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); | 57 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); |
57 }; | 58 }; |
58 | 59 |
59 } // namespace content | 60 } // namespace content |
60 | 61 |
61 #endif // CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 62 #endif // CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ |
OLD | NEW |