OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 (requestType == RequestType::kIsConditional || | 247 (requestType == RequestType::kIsConditional || |
248 method == RequestMethod::kIsPost)) | 248 method == RequestMethod::kIsPost)) |
249 ? WebCachePolicy::ValidatingCacheData | 249 ? WebCachePolicy::ValidatingCacheData |
250 : WebCachePolicy::UseProtocolCachePolicy; | 250 : WebCachePolicy::UseProtocolCachePolicy; |
251 case FrameLoadTypeBackForward: | 251 case FrameLoadTypeBackForward: |
252 // Mutates the policy for POST requests to avoid form resubmission. | 252 // Mutates the policy for POST requests to avoid form resubmission. |
253 return method == RequestMethod::kIsPost | 253 return method == RequestMethod::kIsPost |
254 ? WebCachePolicy::ReturnCacheDataDontLoad | 254 ? WebCachePolicy::ReturnCacheDataDontLoad |
255 : WebCachePolicy::ReturnCacheDataElseLoad; | 255 : WebCachePolicy::ReturnCacheDataElseLoad; |
256 case FrameLoadTypeReload: | 256 case FrameLoadTypeReload: |
257 return WebCachePolicy::ValidatingCacheData; | |
258 case FrameLoadTypeReloadMainResource: | |
259 return resourceType == ResourceType::kIsMainResource | 257 return resourceType == ResourceType::kIsMainResource |
260 ? WebCachePolicy::ValidatingCacheData | 258 ? WebCachePolicy::ValidatingCacheData |
261 : WebCachePolicy::UseProtocolCachePolicy; | 259 : WebCachePolicy::UseProtocolCachePolicy; |
262 case FrameLoadTypeReloadBypassingCache: | 260 case FrameLoadTypeReloadBypassingCache: |
263 // TODO(toyoshim): Should return BypassingCache always, but keep legacy | 261 // TODO(toyoshim): Should return BypassingCache always, but keep legacy |
264 // logic as is. To be changed in a follow-up patch soon. | 262 // logic as is. To be changed in a follow-up patch soon. |
265 return (resourceType == ResourceType::kIsMainResource && | 263 return (resourceType == ResourceType::kIsMainResource && |
266 (requestType == RequestType::kIsConditional || | 264 (requestType == RequestType::kIsConditional || |
267 method == RequestMethod::kIsPost)) | 265 method == RequestMethod::kIsPost)) |
268 ? WebCachePolicy::ValidatingCacheData | 266 ? WebCachePolicy::ValidatingCacheData |
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 response); | 1073 response); |
1076 } | 1074 } |
1077 | 1075 |
1078 DEFINE_TRACE(FrameFetchContext) { | 1076 DEFINE_TRACE(FrameFetchContext) { |
1079 visitor->trace(m_document); | 1077 visitor->trace(m_document); |
1080 visitor->trace(m_documentLoader); | 1078 visitor->trace(m_documentLoader); |
1081 FetchContext::trace(visitor); | 1079 FetchContext::trace(visitor); |
1082 } | 1080 } |
1083 | 1081 |
1084 } // namespace blink | 1082 } // namespace blink |
OLD | NEW |