Add the ability to not send cookies or send user name/password.
Added unit tests for the above functionality plus the do not save cookies functionality.
BUG=http://crbug.com/10961
TEST=Added unit tests for this. Also, this isn't yet called from the rest of the code.
Review URL: http://codereview.chromium.org/173206
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24412 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index b019c48..b0438fa 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -661,6 +661,9 @@
}
std::string URLRequestHttpJob::AssembleRequestCookies() {
+ if (request_info_.load_flags & net::LOAD_DO_NOT_SEND_COOKIES)
+ return std::string();
+
URLRequestContext* context = request_->context();
if (context) {
// Add in the cookie header. TODO might we need more than one header?