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

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

Issue 2517983002: [DevTools] Properly handle cache-only requests when cache is disabled (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 load_flags |= net::LOAD_BYPASS_CACHE; 199 load_flags |= net::LOAD_BYPASS_CACHE;
200 break; 200 break;
201 case WebCachePolicy::ReturnCacheDataElseLoad: 201 case WebCachePolicy::ReturnCacheDataElseLoad:
202 load_flags |= net::LOAD_PREFERRING_CACHE; 202 load_flags |= net::LOAD_PREFERRING_CACHE;
203 break; 203 break;
204 case WebCachePolicy::ReturnCacheDataDontLoad: 204 case WebCachePolicy::ReturnCacheDataDontLoad:
205 load_flags |= net::LOAD_ONLY_FROM_CACHE; 205 load_flags |= net::LOAD_ONLY_FROM_CACHE;
206 break; 206 break;
207 case WebCachePolicy::UseProtocolCachePolicy: 207 case WebCachePolicy::UseProtocolCachePolicy:
208 break; 208 break;
209 case WebCachePolicy::BypassCacheLoadOnlyFromCache:
210 load_flags |= net::LOAD_ONLY_FROM_CACHE | net::LOAD_BYPASS_CACHE;
211 break;
209 default: 212 default:
210 NOTREACHED(); 213 NOTREACHED();
211 } 214 }
212 215
213 if (!request.allowStoredCredentials()) { 216 if (!request.allowStoredCredentials()) {
214 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; 217 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES;
215 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; 218 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES;
216 } 219 }
217 220
218 if (!request.allowStoredCredentials()) 221 if (!request.allowStoredCredentials())
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 bool stale_copy_in_cache, 504 bool stale_copy_in_cache,
502 int reason, 505 int reason,
503 bool was_ignored_by_handler) { 506 bool was_ignored_by_handler) {
504 blink::WebURLError error = 507 blink::WebURLError error =
505 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); 508 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason);
506 error.wasIgnoredByHandler = was_ignored_by_handler; 509 error.wasIgnoredByHandler = was_ignored_by_handler;
507 return error; 510 return error;
508 } 511 }
509 512
510 } // namespace content 513 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698