Commit 4e858b1d authored by Dmitry Gozman's avatar Dmitry Gozman Committed by Commit Bot

Frame serializer: do not ask for cache control on request

Frame serializer currently asks DocumentLoader's request whether
cache control no store is present.

However, we are not setting headers on fake navigation requests
for a long time already. See CreateURLRequestForNavigation
in render_frame_impl.cc for a reference.

This patch removes the check which is never true nowdays.

Bug: none
Change-Id: I6098ee39dabc414573f991a7904b53e344216eac
Reviewed-on: https://chromium-review.googlesource.com/c/1394997Reviewed-by: default avatarŁukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: default avatarJustin DeWitt <dewittj@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620013}
parent e897c90a
...@@ -403,14 +403,10 @@ std::pair<Node*, Element*> MHTMLFrameSerializerDelegate::GetAuxiliaryDOMTree( ...@@ -403,14 +403,10 @@ std::pair<Node*, Element*> MHTMLFrameSerializerDelegate::GetAuxiliaryDOMTree(
bool CacheControlNoStoreHeaderPresent( bool CacheControlNoStoreHeaderPresent(
const WebLocalFrameImpl& web_local_frame) { const WebLocalFrameImpl& web_local_frame) {
const ResourceResponse& response = return web_local_frame.GetDocumentLoader()
web_local_frame.GetDocumentLoader()->GetResponse().ToResourceResponse(); ->GetResponse()
if (response.CacheControlContainsNoStore()) .ToResourceResponse()
return true; .CacheControlContainsNoStore();
DocumentLoader* document_loader =
web_local_frame.GetFrame()->Loader().GetDocumentLoader();
return document_loader->CacheControlContainsNoStore();
} }
bool FrameShouldBeSerializedAsMHTML( bool FrameShouldBeSerializedAsMHTML(
......
...@@ -373,10 +373,6 @@ EncodedFormData* DocumentLoader::HttpBody() const { ...@@ -373,10 +373,6 @@ EncodedFormData* DocumentLoader::HttpBody() const {
return request_.HttpBody(); return request_.HttpBody();
} }
bool DocumentLoader::CacheControlContainsNoStore() const {
return request_.CacheControlContainsNoStore();
}
void DocumentLoader::SetHistoryItemStateForCommit( void DocumentLoader::SetHistoryItemStateForCommit(
HistoryItem* old_item, HistoryItem* old_item,
WebFrameLoadType load_type, WebFrameLoadType load_type,
......
...@@ -132,7 +132,6 @@ class CORE_EXPORT DocumentLoader ...@@ -132,7 +132,6 @@ class CORE_EXPORT DocumentLoader
const KURL& UrlForHistory() const; const KURL& UrlForHistory() const;
const AtomicString& Referrer() const; const AtomicString& Referrer() const;
EncodedFormData* HttpBody() const; EncodedFormData* HttpBody() const;
bool CacheControlContainsNoStore() const;
void DidChangePerformanceTiming(); void DidChangePerformanceTiming();
void DidObserveLoadingBehavior(WebLoadingBehaviorFlag); void DidObserveLoadingBehavior(WebLoadingBehaviorFlag);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment