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

Side by Side Diff: content/child/web_url_request_util.cc

Issue 786423002: Get rid of net::DO_NOT_PROMPT_FOR_LOGIN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delete flag from iOS code Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 load_flags |= net::LOAD_REPORT_RAW_HEADERS; 202 load_flags |= net::LOAD_REPORT_RAW_HEADERS;
203 203
204 if (!request.allowStoredCredentials()) { 204 if (!request.allowStoredCredentials()) {
205 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; 205 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES;
206 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; 206 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES;
207 } 207 }
208 208
209 if (!request.allowStoredCredentials()) 209 if (!request.allowStoredCredentials())
210 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; 210 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA;
211 211
212 if (request.requestContext() == WebURLRequest::RequestContextXMLHttpRequest &&
213 (url.has_username() || url.has_password())) {
214 load_flags |= net::LOAD_DO_NOT_PROMPT_FOR_LOGIN;
215 }
216 return load_flags; 212 return load_flags;
217 } 213 }
218 214
219 scoped_refptr<ResourceRequestBody> GetRequestBodyForWebURLRequest( 215 scoped_refptr<ResourceRequestBody> GetRequestBodyForWebURLRequest(
220 const blink::WebURLRequest& request) { 216 const blink::WebURLRequest& request) {
221 scoped_refptr<ResourceRequestBody> request_body; 217 scoped_refptr<ResourceRequestBody> request_body;
222 218
223 if (request.httpBody().isNull()) { 219 if (request.httpBody().isNull()) {
224 return request_body; 220 return request_body;
225 } 221 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 break; 266 break;
271 default: 267 default:
272 NOTREACHED(); 268 NOTREACHED();
273 } 269 }
274 } 270 }
275 request_body->set_identifier(request.httpBody().identifier()); 271 request_body->set_identifier(request.httpBody().identifier());
276 return request_body; 272 return request_body;
277 } 273 }
278 274
279 } // namespace content 275 } // namespace content
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698