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

Unified Diff: net/url_request/url_request.cc

Issue 8743019: base::Bind: Convert net::NetworkDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years, 1 month 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 | « net/url_request/url_request.h ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 9fcae428edfa1fad4abcd78198023a99b5b545be..af405d7246d3d00a7e81d78ab892776bd6930c2b 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -5,6 +5,7 @@
#include "net/url_request/url_request.h"
#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/lazy_instance.h"
@@ -148,8 +149,9 @@ URLRequest::URLRequest(const GURL& url, Delegate* delegate)
priority_(LOWEST),
identifier_(GenerateURLRequestIdentifier()),
blocked_on_delegate_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- before_request_callback_(this, &URLRequest::BeforeRequestComplete)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(before_request_callback_(
+ base::Bind(&URLRequest::BeforeRequestComplete,
+ base::Unretained(this)))),
has_notified_completion_(false) {
SIMPLE_STATS_COUNTER("URLRequestCount");
@@ -417,7 +419,7 @@ void URLRequest::Start() {
// Only notify the delegate for the initial request.
if (context_ && context_->network_delegate()) {
int error = context_->network_delegate()->NotifyBeforeURLRequest(
- this, &before_request_callback_, &delegate_redirect_url_);
+ this, before_request_callback_, &delegate_redirect_url_);
if (error != net::OK) {
if (error == net::ERR_IO_PENDING) {
// Paused on the delegate, will invoke |before_request_callback_| later.
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698