| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "net/url_request/url_request_context_getter.h" | 12 #include "net/url_request/url_request_context_getter.h" |
| 13 | 13 |
| 14 class MessageLoop; | 14 class MessageLoop; |
| 15 | 15 |
| 16 namespace net { | 16 namespace net { |
| 17 class HostResolver; | 17 class HostResolver; |
| 18 class NetworkDelegate; | 18 class NetworkDelegate; |
| 19 class ProxyConfigService; | 19 class ProxyConfigService; |
| 20 class URLRequestContextStorage; | 20 class URLRequestContextStorage; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 | 24 |
| 25 class ShellURLRequestContextGetter : public net::URLRequestContextGetter { | 25 class ShellURLRequestContextGetter : public net::URLRequestContextGetter { |
| 26 public: | 26 public: |
| 27 ShellURLRequestContextGetter( | 27 ShellURLRequestContextGetter( |
| 28 bool ignore_certificate_errors, |
| 28 const FilePath& base_path, | 29 const FilePath& base_path, |
| 29 MessageLoop* io_loop, | 30 MessageLoop* io_loop, |
| 30 MessageLoop* file_loop); | 31 MessageLoop* file_loop); |
| 31 | 32 |
| 32 // net::URLRequestContextGetter implementation. | 33 // net::URLRequestContextGetter implementation. |
| 33 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; | 34 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; |
| 34 virtual scoped_refptr<base::SingleThreadTaskRunner> | 35 virtual scoped_refptr<base::SingleThreadTaskRunner> |
| 35 GetNetworkTaskRunner() const OVERRIDE; | 36 GetNetworkTaskRunner() const OVERRIDE; |
| 36 | 37 |
| 37 net::HostResolver* host_resolver(); | 38 net::HostResolver* host_resolver(); |
| 38 | 39 |
| 39 protected: | 40 protected: |
| 40 virtual ~ShellURLRequestContextGetter(); | 41 virtual ~ShellURLRequestContextGetter(); |
| 41 | 42 |
| 42 private: | 43 private: |
| 44 bool ignore_certificate_errors_; |
| 43 FilePath base_path_; | 45 FilePath base_path_; |
| 44 MessageLoop* io_loop_; | 46 MessageLoop* io_loop_; |
| 45 MessageLoop* file_loop_; | 47 MessageLoop* file_loop_; |
| 46 | 48 |
| 47 scoped_ptr<net::ProxyConfigService> proxy_config_service_; | 49 scoped_ptr<net::ProxyConfigService> proxy_config_service_; |
| 48 scoped_ptr<net::NetworkDelegate> network_delegate_; | 50 scoped_ptr<net::NetworkDelegate> network_delegate_; |
| 49 scoped_ptr<net::URLRequestContextStorage> storage_; | 51 scoped_ptr<net::URLRequestContextStorage> storage_; |
| 50 scoped_ptr<net::URLRequestContext> url_request_context_; | 52 scoped_ptr<net::URLRequestContext> url_request_context_; |
| 51 | 53 |
| 52 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); | 54 DISALLOW_COPY_AND_ASSIGN(ShellURLRequestContextGetter); |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 } // namespace content | 57 } // namespace content |
| 56 | 58 |
| 57 #endif // CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ | 59 #endif // CONTENT_SHELL_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ |
| OLD | NEW |