Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3868)

Unified Diff: chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc

Issue 8799001: base::Bind: Convert proxy_resolution_service_provider.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Logic fix. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/proxy/proxy_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
diff --git a/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc b/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
index f003ea0d2ae936c9a0e0133798ca2b1179f0ec11..83361a28b402bb23a257a64241ffa0473f3a286f 100644
--- a/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
+++ b/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/dbus/proxy_resolution_service_provider.h"
#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/threading/platform_thread.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -28,8 +29,8 @@ class ProxyResolverImpl : public ProxyResolverInterface {
class Request {
public:
explicit Request(const std::string& source_url)
- : ALLOW_THIS_IN_INITIALIZER_LIST(
- completion_callback_(this, &Request::OnCompletion)),
+ : ALLOW_THIS_IN_INITIALIZER_LIST(callback_(
+ base::Bind(&Request::OnCompletion, base::Unretained(this)))),
source_url_(source_url) {
}
@@ -46,7 +47,7 @@ class ProxyResolverImpl : public ProxyResolverInterface {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, notify_task_);
}
- net::OldCompletionCallbackImpl<Request> completion_callback_;
+ net::CompletionCallback callback_;
std::string source_url_; // URL being resolved.
net::ProxyInfo proxy_info_; // ProxyInfo resolved for source_url_.
@@ -135,7 +136,7 @@ class ProxyResolverImpl : public ProxyResolverInterface {
<< request->source_url_;
const int result = proxy_service->ResolveProxy(
GURL(request->source_url_), &request->proxy_info_,
- &request->completion_callback_, NULL, net::BoundNetLog());
+ request->callback_, NULL, net::BoundNetLog());
if (result != net::ERR_IO_PENDING) {
VLOG(1) << "Network proxy resolution completed synchronously.";
request->OnCompletion(result);
« no previous file with comments | « no previous file | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698