Index: net/url_request/url_request_http_job.cc |
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc |
index 8a7d2981d451357bbd79c0bff1dc253e20757694..d83bdb10df87a0cd0184c011704e8f98ab5a2313 100644 |
--- a/net/url_request/url_request_http_job.cc |
+++ b/net/url_request/url_request_http_job.cc |
@@ -553,6 +553,17 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() { |
} |
} |
+void URLRequestHttpJob::CheckForXAutoLogin() { |
+ const HttpResponseInfo* response_info = transaction_->GetResponseInfo(); |
+ DCHECK(response_info); |
+ |
+ std::string auto_login = HttpResponseHeaders::kXAutoLogin; |
+ std::string value; |
+ if (response_info->headers->EnumerateHeader(NULL, auto_login, &value)) { |
+ request_->delegate()->OnAutoLogin(request_, value); |
+ } |
+} |
+ |
void URLRequestHttpJob::SaveCookiesAndNotifyHeadersComplete() { |
DCHECK(transaction_.get()); |
@@ -748,6 +759,7 @@ void URLRequestHttpJob::OnStartCompleted(int result) { |
} |
if (result == OK) { |
+ CheckForXAutoLogin(); |
darin (slow to review)
2011/07/01 17:46:21
why can't you just do X-Auto-Login processing at a
willchan no longer on Chromium
2011/07/02 18:10:15
+1
|
SaveCookiesAndNotifyHeadersComplete(); |
} else if (ShouldTreatAsCertificateError(result)) { |
// We encountered an SSL certificate error. Ask our delegate to decide |