Chromium Code Reviews| Index: chromeos/dbus/services/proxy_resolution_service_provider.h |
| diff --git a/chromeos/dbus/services/proxy_resolution_service_provider.h b/chromeos/dbus/services/proxy_resolution_service_provider.h |
| index 244994d347e16ca3aa76f796a1f8b3d514cb0d81..781ccea6b07b0518129b27868b369bd40f873817 100644 |
| --- a/chromeos/dbus/services/proxy_resolution_service_provider.h |
| +++ b/chromeos/dbus/services/proxy_resolution_service_provider.h |
| @@ -103,12 +103,23 @@ class CHROMEOS_EXPORT ProxyResolutionServiceProvider |
| void ResolveProxy(dbus::MethodCall* method_call, |
| dbus::ExportedObject::ResponseSender response_sender); |
| + // Callback passed to network thread static methods to run |
| + // NotifyProxyResolved() on |origin_thread_|. |
| + using NotifyCallback = base::Callback<void(std::unique_ptr<Request>)>; |
| + |
| // Helper method for ResolveProxy() that runs on network thread. |
| - void ResolveProxyOnNetworkThread(std::unique_ptr<Request> request); |
| + static void ResolveProxyOnNetworkThread( |
| + std::unique_ptr<Request> request, |
| + scoped_refptr<base::SingleThreadTaskRunner> notify_thread, |
| + NotifyCallback notify_callback); |
|
James Cook
2017/04/03 15:30:23
I really appreciate your consistent naming of thin
|
| // Callback on network thread for when net::ProxyService::ResolveProxy() |
| // completes, synchronously or asynchronously. |
| - void OnResolutionComplete(std::unique_ptr<Request> request, int result); |
| + static void OnResolutionComplete( |
| + std::unique_ptr<Request> request, |
| + scoped_refptr<base::SingleThreadTaskRunner> notify_thread, |
| + NotifyCallback notify_callback, |
| + int result); |
| // Called on UI thread from OnResolutionComplete() to pass the resolved proxy |
| // information to the client over D-Bus. |