| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 ResourceRequestCachePolicy FrameFetchContext::resourceRequestCachePolicy(const R
esourceRequest& request, Resource::Type type) const | 159 ResourceRequestCachePolicy FrameFetchContext::resourceRequestCachePolicy(const R
esourceRequest& request, Resource::Type type) const |
| 160 { | 160 { |
| 161 if (type == Resource::MainResource) { | 161 if (type == Resource::MainResource) { |
| 162 FrameLoadType frameLoadType = frame()->loader().loadType(); | 162 FrameLoadType frameLoadType = frame()->loader().loadType(); |
| 163 if (request.httpMethod() == "POST" && frameLoadType == FrameLoadTypeBack
Forward) | 163 if (request.httpMethod() == "POST" && frameLoadType == FrameLoadTypeBack
Forward) |
| 164 return ReturnCacheDataDontLoad; | 164 return ReturnCacheDataDontLoad; |
| 165 if (!frame()->host()->overrideEncoding().isEmpty() || frameLoadType == F
rameLoadTypeBackForward) | 165 if (!frame()->host()->overrideEncoding().isEmpty() || frameLoadType == F
rameLoadTypeBackForward) |
| 166 return ReturnCacheDataElseLoad; | 166 return ReturnCacheDataElseLoad; |
| 167 if (frameLoadType == FrameLoadTypeReloadFromOrigin) | 167 if (frameLoadType == FrameLoadTypeReloadFromOrigin) |
| 168 return ReloadBypassingCache; | 168 return ReloadBypassingCache; |
| 169 if (frameLoadType == FrameLoadTypeReload || frameLoadType == FrameLoadTy
peSame || request.isConditional() || request.httpMethod() == "POST") | 169 if (frameLoadType == FrameLoadTypeReload || request.isConditional() || r
equest.httpMethod() == "POST") |
| 170 return ReloadIgnoringCacheData; | 170 return ReloadIgnoringCacheData; |
| 171 Frame* parent = frame()->tree().parent(); | 171 Frame* parent = frame()->tree().parent(); |
| 172 if (parent && parent->isLocalFrame()) | 172 if (parent && parent->isLocalFrame()) |
| 173 return toLocalFrame(parent)->document()->fetcher()->context().resour
ceRequestCachePolicy(request, type); | 173 return toLocalFrame(parent)->document()->fetcher()->context().resour
ceRequestCachePolicy(request, type); |
| 174 return UseProtocolCachePolicy; | 174 return UseProtocolCachePolicy; |
| 175 } | 175 } |
| 176 | 176 |
| 177 if (request.isConditional()) | 177 if (request.isConditional()) |
| 178 return ReloadIgnoringCacheData; | 178 return ReloadIgnoringCacheData; |
| 179 | 179 |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 return !frame()->isMainFrame() && frame()->settings() && frame()->settings()
->lowPriorityIframes(); | 661 return !frame()->isMainFrame() && frame()->settings() && frame()->settings()
->lowPriorityIframes(); |
| 662 } | 662 } |
| 663 | 663 |
| 664 DEFINE_TRACE(FrameFetchContext) | 664 DEFINE_TRACE(FrameFetchContext) |
| 665 { | 665 { |
| 666 visitor->trace(m_document); | 666 visitor->trace(m_document); |
| 667 FetchContext::trace(visitor); | 667 FetchContext::trace(visitor); |
| 668 } | 668 } |
| 669 | 669 |
| 670 } // namespace blink | 670 } // namespace blink |
| OLD | NEW |