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

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

Issue 1913803002: not for review, but for running tests with an error code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 HeaderFlattener flattener; 182 HeaderFlattener flattener;
183 request.visitHTTPHeaderFields(&flattener); 183 request.visitHTTPHeaderFields(&flattener);
184 return flattener.GetBuffer(); 184 return flattener.GetBuffer();
185 } 185 }
186 186
187 int GetLoadFlagsForWebURLRequest(const blink::WebURLRequest& request) { 187 int GetLoadFlagsForWebURLRequest(const blink::WebURLRequest& request) {
188 int load_flags = net::LOAD_NORMAL; 188 int load_flags = net::LOAD_NORMAL;
189 GURL url = request.url(); 189 GURL url = request.url();
190 switch (request.getCachePolicy()) { 190 switch (request.getCachePolicy()) {
191 case WebCachePolicy::ValidatingCacheData: 191 case WebCachePolicy::ValidatingCacheData:
192 load_flags |= net::LOAD_VALIDATE_CACHE;
193 break; 192 break;
194 case WebCachePolicy::BypassingCache: 193 case WebCachePolicy::BypassingCache:
195 load_flags |= net::LOAD_BYPASS_CACHE; 194 load_flags |= net::LOAD_BYPASS_CACHE;
196 break; 195 break;
197 case WebCachePolicy::ReturnCacheDataElseLoad: 196 case WebCachePolicy::ReturnCacheDataElseLoad:
198 load_flags |= net::LOAD_PREFERRING_CACHE; 197 load_flags |= net::LOAD_PREFERRING_CACHE;
199 break; 198 break;
200 case WebCachePolicy::ReturnCacheDataDontLoad: 199 case WebCachePolicy::ReturnCacheDataDontLoad:
201 load_flags |= net::LOAD_ONLY_FROM_CACHE; 200 load_flags |= net::LOAD_ONLY_FROM_CACHE;
202 break; 201 break;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 bool stale_copy_in_cache, 433 bool stale_copy_in_cache,
435 int reason, 434 int reason,
436 bool was_ignored_by_handler) { 435 bool was_ignored_by_handler) {
437 blink::WebURLError error = 436 blink::WebURLError error =
438 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); 437 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason);
439 error.wasIgnoredByHandler = was_ignored_by_handler; 438 error.wasIgnoredByHandler = was_ignored_by_handler;
440 return error; 439 return error;
441 } 440 }
442 441
443 } // namespace content 442 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698