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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 7273081: Upstream android net related code (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 months 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
« net/url_request/url_request.h ('K') | « net/url_request/url_request_http_job.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« net/url_request/url_request.h ('K') | « net/url_request/url_request_http_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698