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

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: Fix field init Created 6 years 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
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698