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

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

Issue 669073003: Get rid of net::LOAD_ENABLE_UPLOAD_PROGRESS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed uninitialized value use. Created 6 years, 1 month 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 break; 190 break;
191 case WebURLRequest::ReturnCacheDataDontLoad: 191 case WebURLRequest::ReturnCacheDataDontLoad:
192 load_flags |= net::LOAD_ONLY_FROM_CACHE; 192 load_flags |= net::LOAD_ONLY_FROM_CACHE;
193 break; 193 break;
194 case WebURLRequest::UseProtocolCachePolicy: 194 case WebURLRequest::UseProtocolCachePolicy:
195 break; 195 break;
196 default: 196 default:
197 NOTREACHED(); 197 NOTREACHED();
198 } 198 }
199 199
200 if (request.reportUploadProgress())
201 load_flags |= net::LOAD_ENABLE_UPLOAD_PROGRESS;
202 if (request.reportRawHeaders()) 200 if (request.reportRawHeaders())
203 load_flags |= net::LOAD_REPORT_RAW_HEADERS; 201 load_flags |= net::LOAD_REPORT_RAW_HEADERS;
204 202
205 if (!request.allowStoredCredentials()) { 203 if (!request.allowStoredCredentials()) {
206 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; 204 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES;
207 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; 205 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES;
208 } 206 }
209 207
210 if (!request.allowStoredCredentials()) 208 if (!request.allowStoredCredentials())
211 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; 209 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA;
212 210
213 if (request.requestContext() == WebURLRequest::RequestContextXMLHttpRequest && 211 if (request.requestContext() == WebURLRequest::RequestContextXMLHttpRequest &&
214 (url.has_username() || url.has_password())) { 212 (url.has_username() || url.has_password())) {
215 load_flags |= net::LOAD_DO_NOT_PROMPT_FOR_LOGIN; 213 load_flags |= net::LOAD_DO_NOT_PROMPT_FOR_LOGIN;
216 } 214 }
217 return load_flags; 215 return load_flags;
218 } 216 }
219 217
220 } // namespace content 218 } // 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