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 #include "chromeos/dbus/services/proxy_resolution_service_provider.h" | 5 #include "chromeos/dbus/services/proxy_resolution_service_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 } | 127 } |
128 | 128 |
129 VLOG(1) << "Starting network proxy resolution for " | 129 VLOG(1) << "Starting network proxy resolution for " |
130 << request->source_url_; | 130 << request->source_url_; |
131 net::CompletionCallback completion_callback = | 131 net::CompletionCallback completion_callback = |
132 base::Bind(&Request::OnCompletion, | 132 base::Bind(&Request::OnCompletion, |
133 base::Unretained(request), | 133 base::Unretained(request), |
134 origin_thread); | 134 origin_thread); |
135 const int result = proxy_service->ResolveProxy( | 135 const int result = proxy_service->ResolveProxy( |
136 GURL(request->source_url_), std::string(), &request->proxy_info_, | 136 GURL(request->source_url_), std::string(), &request->proxy_info_, |
137 completion_callback, NULL, NULL, net::BoundNetLog()); | 137 completion_callback, NULL, NULL, net::NetLogWithSource()); |
138 if (result != net::ERR_IO_PENDING) { | 138 if (result != net::ERR_IO_PENDING) { |
139 VLOG(1) << "Network proxy resolution completed synchronously."; | 139 VLOG(1) << "Network proxy resolution completed synchronously."; |
140 completion_callback.Run(result); | 140 completion_callback.Run(result); |
141 } | 141 } |
142 } | 142 } |
143 | 143 |
144 // Called on UI thread as task posted from Request::OnCompletion on IO | 144 // Called on UI thread as task posted from Request::OnCompletion on IO |
145 // thread. | 145 // thread. |
146 void NotifyProxyResolved( | 146 void NotifyProxyResolved( |
147 const std::string& signal_interface, | 147 const std::string& signal_interface, |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 ProxyResolutionServiceProvider* ProxyResolutionServiceProvider::Create( | 268 ProxyResolutionServiceProvider* ProxyResolutionServiceProvider::Create( |
269 std::unique_ptr<ProxyResolverDelegate> delegate) { | 269 std::unique_ptr<ProxyResolverDelegate> delegate) { |
270 return new ProxyResolutionServiceProvider( | 270 return new ProxyResolutionServiceProvider( |
271 new ProxyResolverImpl(std::move(delegate))); | 271 new ProxyResolverImpl(std::move(delegate))); |
272 } | 272 } |
273 | 273 |
274 ProxyResolverInterface::~ProxyResolverInterface() { | 274 ProxyResolverInterface::~ProxyResolverInterface() { |
275 } | 275 } |
276 | 276 |
277 } // namespace chromeos | 277 } // namespace chromeos |
OLD | NEW |