| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/child/web_url_request_util.h" | 5 #include "content/child/web_url_request_util.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "net/base/load_flags.h" | 9 #include "net/base/load_flags.h" |
| 10 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h" | 10 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 load_flags |= net::LOAD_REPORT_RAW_HEADERS; | 201 load_flags |= net::LOAD_REPORT_RAW_HEADERS; |
| 202 | 202 |
| 203 if (!request.allowStoredCredentials()) { | 203 if (!request.allowStoredCredentials()) { |
| 204 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; | 204 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; |
| 205 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; | 205 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; |
| 206 } | 206 } |
| 207 | 207 |
| 208 if (!request.allowStoredCredentials()) | 208 if (!request.allowStoredCredentials()) |
| 209 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; | 209 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; |
| 210 | 210 |
| 211 if (request.requestContext() == WebURLRequest::RequestContextXMLHttpRequest && | |
| 212 (url.has_username() || url.has_password())) { | |
| 213 load_flags |= net::LOAD_DO_NOT_PROMPT_FOR_LOGIN; | |
| 214 } | |
| 215 return load_flags; | 211 return load_flags; |
| 216 } | 212 } |
| 217 | 213 |
| 218 } // namespace content | 214 } // namespace content |
| OLD | NEW |