Chromium Code Reviews| Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
| diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
| index 830f1ebc75063c5ff64203f9a248c5d957b2c2d2..2014151a9491cc779b0f7d00709d802f32394219 100644 |
| --- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
| +++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
| @@ -120,8 +120,7 @@ bool shouldDisallowFetchForMainFrameScript(const ResourceRequest& request, Fetch |
| // recover if blocking of a script is leading to a page break and the user |
| // reloads the page. |
| const FrameLoadType loadType = document.frame()->loader().loadType(); |
| - const bool isReload = loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadBypassingCache || loadType == FrameLoadTypeReloadMainResource; |
| - if (isReload) { |
| + if (isReloadLoadType(loadType)) { |
| // Recording this metric since an increase in number of reloads for pages |
| // where a script was blocked could be indicative of a page break. |
| document.loader()->didObserveLoadingBehavior(WebLoadingBehaviorFlag::WebLoadingBehaviorDocumentWriteBlockReload); |
| @@ -219,6 +218,9 @@ CachePolicy FrameFetchContext::getCachePolicy() const |
| if (m_documentLoader && m_documentLoader->request().getCachePolicy() == WebCachePolicy::ReturnCacheDataElseLoad) |
| return CachePolicyHistoryBuffer; |
| + |
| + // Returning CachePolicyVerify for FrameLoadTypeReloadMainResource is |
| + // intentional. |
|
hiroshige
2016/07/26 07:37:17
Not blocking this CL, but do we have any documents
Takashi Toyoshima
2016/07/26 08:14:20
How about public/web/WebFrameLoadType.h?
core/load
|
| return CachePolicyVerify; |
| } |
| @@ -258,6 +260,8 @@ WebCachePolicy FrameFetchContext::resourceRequestCachePolicy(const ResourceReque |
| if (frameLoadType == FrameLoadTypeReload) |
| return WebCachePolicy::ValidatingCacheData; |
| } |
| + // Returning UseProtocolCachePolicy for FrameLoadTypeReloadMainResource |
| + // is intentional. |
|
hiroshige
2016/07/26 07:37:17
ditto.
|
| return WebCachePolicy::UseProtocolCachePolicy; |
| } |