| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PROXY_PROXY_RESOLVER_MOJO_H_ | 5 #ifndef NET_PROXY_PROXY_RESOLVER_MOJO_H_ |
| 6 #define NET_PROXY_PROXY_RESOLVER_MOJO_H_ | 6 #define NET_PROXY_PROXY_RESOLVER_MOJO_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void OnConnectionError() override; | 64 void OnConnectionError() override; |
| 65 | 65 |
| 66 // Callback for ProxyResolverService::SetPacScript. | 66 // Callback for ProxyResolverService::SetPacScript. |
| 67 void OnSetPacScriptDone( | 67 void OnSetPacScriptDone( |
| 68 const scoped_refptr<ProxyResolverScriptData>& pac_script, | 68 const scoped_refptr<ProxyResolverScriptData>& pac_script, |
| 69 const net::CompletionCallback& callback, | 69 const net::CompletionCallback& callback, |
| 70 int32_t result); | 70 int32_t result); |
| 71 | 71 |
| 72 void SetUpServices(); | 72 void SetUpServices(); |
| 73 | 73 |
| 74 void AbortPendingRequests(); | |
| 75 | |
| 76 void RemoveJob(Job* job); | 74 void RemoveJob(Job* job); |
| 77 | 75 |
| 78 // Connection to the Mojo proxy resolver. | 76 // Connection to the Mojo proxy resolver. |
| 79 interfaces::ProxyResolverPtr mojo_proxy_resolver_ptr_; | 77 interfaces::ProxyResolverPtr mojo_proxy_resolver_ptr_; |
| 80 | 78 |
| 81 // Mojo host resolver service and binding. | 79 // Mojo host resolver service and binding. |
| 82 scoped_ptr<interfaces::HostResolver> mojo_host_resolver_; | 80 scoped_ptr<interfaces::HostResolver> mojo_host_resolver_; |
| 83 scoped_ptr<mojo::Binding<interfaces::HostResolver>> | 81 scoped_ptr<mojo::Binding<interfaces::HostResolver>> |
| 84 mojo_host_resolver_binding_; | 82 mojo_host_resolver_binding_; |
| 85 | 83 |
| 86 // Factory for connecting to new Mojo proxy resolvers. | 84 // Factory for connecting to new Mojo proxy resolvers. |
| 87 // Not owned. | 85 // Not owned. |
| 88 MojoProxyResolverFactory* mojo_proxy_resolver_factory_; | 86 MojoProxyResolverFactory* mojo_proxy_resolver_factory_; |
| 89 | 87 |
| 90 // DNS resolver, saved for creating a new Mojo proxy resolver when the | 88 // DNS resolver, saved for creating a new Mojo proxy resolver when the |
| 91 // existing one disconnects (i.e. when utility process crashes). | 89 // existing one disconnects (i.e. when utility process crashes). |
| 92 HostResolver* host_resolver_; | 90 HostResolver* host_resolver_; |
| 93 | 91 |
| 94 std::set<Job*> pending_jobs_; | 92 std::set<Job*> pending_jobs_; |
| 95 net::CancelableCompletionCallback set_pac_script_callback_; | 93 net::CancelableCompletionCallback set_pac_script_callback_; |
| 96 | 94 |
| 97 base::ThreadChecker thread_checker_; | 95 base::ThreadChecker thread_checker_; |
| 98 | 96 |
| 99 DISALLOW_COPY_AND_ASSIGN(ProxyResolverMojo); | 97 DISALLOW_COPY_AND_ASSIGN(ProxyResolverMojo); |
| 100 }; | 98 }; |
| 101 | 99 |
| 102 } // namespace net | 100 } // namespace net |
| 103 | 101 |
| 104 #endif // NET_PROXY_PROXY_RESOLVER_MOJO_H_ | 102 #endif // NET_PROXY_PROXY_RESOLVER_MOJO_H_ |
| OLD | NEW |