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

Unified Diff: net/url_request/url_request.cc

Issue 11364057: Set blocked_on_delegate_ when a URLRequest is blocked during redirects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix comment Created 8 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
Index: net/url_request/url_request.cc
===================================================================
--- net/url_request/url_request.cc (revision 161387)
+++ net/url_request/url_request.cc (working copy)
@@ -317,7 +317,8 @@
}
LoadStateWithParam URLRequest::GetLoadState() const {
- if (blocked_on_delegate_) {
+ // Only return LOAD_STATE_WAITING_FOR_DELEGATE if there's a load state param.
+ if (blocked_on_delegate_ && !load_state_param_.empty()) {
mmenke 2012/11/07 17:25:25 This is need because the text we display on the lo
eroman 2012/11/13 20:50:11 Do you know what circumstances this happens, and w
return LoadStateWithParam(LOAD_STATE_WAITING_FOR_DELEGATE,
load_state_param_);
}
@@ -638,6 +639,7 @@
RestartWithJob(job);
} else if (delegate_) {
delegate_->OnReceivedRedirect(this, location, defer_redirect);
+ // |this| may be have been destroyed here.
}
}
@@ -950,7 +952,12 @@
void URLRequest::SetBlockedOnDelegate() {
blocked_on_delegate_ = true;
- net_log_.BeginEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE);
+ if (!load_state_param_.empty()) {
+ net_log_.BeginEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE,
+ NetLog::StringCallback("delegate", &load_state_param_));
+ } else {
+ net_log_.BeginEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE);
+ }
}
void URLRequest::SetUnblockedOnDelegate() {

Powered by Google App Engine
This is Rietveld 408576698