| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 load_flags |= net::LOAD_SKIP_CACHE_VALIDATION; | 202 load_flags |= net::LOAD_SKIP_CACHE_VALIDATION; |
| 203 break; | 203 break; |
| 204 case WebCachePolicy::ReturnCacheDataDontLoad: | 204 case WebCachePolicy::ReturnCacheDataDontLoad: |
| 205 load_flags |= net::LOAD_ONLY_FROM_CACHE | net::LOAD_SKIP_CACHE_VALIDATION; | 205 load_flags |= net::LOAD_ONLY_FROM_CACHE | net::LOAD_SKIP_CACHE_VALIDATION; |
| 206 break; | 206 break; |
| 207 case WebCachePolicy::ReturnCacheDataIfValid: | 207 case WebCachePolicy::ReturnCacheDataIfValid: |
| 208 load_flags |= net::LOAD_ONLY_FROM_CACHE; | 208 load_flags |= net::LOAD_ONLY_FROM_CACHE; |
| 209 break; | 209 break; |
| 210 case WebCachePolicy::UseProtocolCachePolicy: | 210 case WebCachePolicy::UseProtocolCachePolicy: |
| 211 break; | 211 break; |
| 212 case WebCachePolicy::BypassCacheLoadOnlyFromCache: |
| 213 load_flags |= net::LOAD_ONLY_FROM_CACHE | net::LOAD_BYPASS_CACHE; |
| 214 break; |
| 212 } | 215 } |
| 213 | 216 |
| 214 if (!request.allowStoredCredentials()) { | 217 if (!request.allowStoredCredentials()) { |
| 215 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; | 218 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; |
| 216 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; | 219 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; |
| 217 } | 220 } |
| 218 | 221 |
| 219 if (!request.allowStoredCredentials()) | 222 if (!request.allowStoredCredentials()) |
| 220 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; | 223 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; |
| 221 | 224 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 bool stale_copy_in_cache, | 509 bool stale_copy_in_cache, |
| 507 int reason, | 510 int reason, |
| 508 bool was_ignored_by_handler) { | 511 bool was_ignored_by_handler) { |
| 509 blink::WebURLError error = | 512 blink::WebURLError error = |
| 510 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); | 513 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); |
| 511 error.wasIgnoredByHandler = was_ignored_by_handler; | 514 error.wasIgnoredByHandler = was_ignored_by_handler; |
| 512 return error; | 515 return error; |
| 513 } | 516 } |
| 514 | 517 |
| 515 } // namespace content | 518 } // namespace content |
| OLD | NEW |