Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_MOJO_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_MOJO_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_MOJO_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_MOJO_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 // URLRequestContextBuilder API, it will be used instead. | 27 // URLRequestContextBuilder API, it will be used instead. |
| 28 class URLRequestContextBuilderMojo : public URLRequestContextBuilder { | 28 class URLRequestContextBuilderMojo : public URLRequestContextBuilder { |
| 29 public: | 29 public: |
| 30 URLRequestContextBuilderMojo(); | 30 URLRequestContextBuilderMojo(); |
| 31 ~URLRequestContextBuilderMojo() override; | 31 ~URLRequestContextBuilderMojo() override; |
| 32 | 32 |
| 33 // Overrides default DhcpProxyScriptFetcherFactory. Ignored if no | 33 // Overrides default DhcpProxyScriptFetcherFactory. Ignored if no |
| 34 // MojoProxyResolverFactory is provided. | 34 // MojoProxyResolverFactory is provided. |
| 35 void set_dhcp_fetcher_factory( | 35 void set_dhcp_fetcher_factory( |
| 36 std::unique_ptr<DhcpProxyScriptFetcherFactory> dhcp_fetcher_factory) { | 36 std::unique_ptr<DhcpProxyScriptFetcherFactory> dhcp_fetcher_factory) { |
| 37 dhcp_fetcher_factory = std::move(dhcp_fetcher_factory_); | 37 dhcp_fetcher_factory_ = std::move(dhcp_fetcher_factory); |
|
Randy Smith (Not in Mondays)
2017/06/13 16:42:15
Snort. That's cute. Is there a (presumably new)
mmenke
2017/06/13 17:02:22
This is caught by integration tests...If you look
Randy Smith (Not in Mondays)
2017/06/15 19:13:30
I'm torn here, but I sorta think that if we're goi
mmenke
2017/06/15 19:33:24
I really don't want to have 5 sets of tests for ev
| |
| 38 } | 38 } |
| 39 | 39 |
| 40 // Sets Mojo factory used to create ProxyResolvers. If not set, falls back to | 40 // Sets Mojo factory used to create ProxyResolvers. If not set, falls back to |
| 41 // URLRequestContext's default behavior. The passed in factory must outlive | 41 // URLRequestContext's default behavior. The passed in factory must outlive |
| 42 // the URLRequestContext the builder creates. | 42 // the URLRequestContext the builder creates. |
| 43 void set_mojo_proxy_resolver_factory( | 43 void set_mojo_proxy_resolver_factory( |
| 44 MojoProxyResolverFactory* mojo_proxy_resolver_factory) { | 44 MojoProxyResolverFactory* mojo_proxy_resolver_factory) { |
| 45 mojo_proxy_resolver_factory_ = mojo_proxy_resolver_factory; | 45 mojo_proxy_resolver_factory_ = mojo_proxy_resolver_factory; |
| 46 } | 46 } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 std::unique_ptr<ProxyService> CreateProxyService( | 49 std::unique_ptr<ProxyService> CreateProxyService( |
| 50 std::unique_ptr<ProxyConfigService> proxy_config_service, | 50 std::unique_ptr<ProxyConfigService> proxy_config_service, |
| 51 URLRequestContext* url_request_context, | 51 URLRequestContext* url_request_context, |
| 52 HostResolver* host_resolver, | 52 HostResolver* host_resolver, |
| 53 NetworkDelegate* network_delegate, | 53 NetworkDelegate* network_delegate, |
| 54 NetLog* net_log) override; | 54 NetLog* net_log) override; |
| 55 | 55 |
| 56 std::unique_ptr<DhcpProxyScriptFetcherFactory> dhcp_fetcher_factory_; | 56 std::unique_ptr<DhcpProxyScriptFetcherFactory> dhcp_fetcher_factory_; |
| 57 | 57 |
| 58 MojoProxyResolverFactory* mojo_proxy_resolver_factory_ = nullptr; | 58 MojoProxyResolverFactory* mojo_proxy_resolver_factory_ = nullptr; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilderMojo); | 60 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilderMojo); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace net | 63 } // namespace net |
| 64 | 64 |
| 65 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_MOJO_H_ | 65 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_MOJO_H_ |
| OLD | NEW |