| Index: third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
|
| index 35672e3b98eb0cb87949f29fafccae7c2958eebf..95487a64b413dba02db0445a1c642707036b718d 100644
|
| --- a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
|
| @@ -76,6 +76,7 @@
|
| #include "platform/exported/WrappedResourceRequest.h"
|
| #include "platform/exported/WrappedResourceResponse.h"
|
| #include "platform/feature_policy/FeaturePolicy.h"
|
| +#include "platform/loader/fetch/ResourceFetcher.h"
|
| #include "platform/network/HTTPParsers.h"
|
| #include "platform/network/mime/MIMETypeRegistry.h"
|
| #include "platform/plugins/PluginData.h"
|
| @@ -514,6 +515,12 @@ NavigationPolicy LocalFrameClientImpl::DecidePolicyForNavigation(
|
| kCheckContentSecurityPolicy
|
| ? kWebContentSecurityPolicyDispositionCheck
|
| : kWebContentSecurityPolicyDispositionDoNotCheck;
|
| +
|
| + if (IsLoadedAsMHTMLArchive()) {
|
| + navigation_info.archive_status =
|
| + WebFrameClient::NavigationPolicyInfo::ArchiveStatus::Present;
|
| + }
|
| +
|
| // Caching could be disabled for requests initiated by DevTools.
|
| // TODO(ananta)
|
| // We should extract the network cache state into a global component which
|
| @@ -980,6 +987,26 @@ WebDevToolsAgentImpl* LocalFrameClientImpl::DevToolsAgent() {
|
| ->DevToolsAgentImpl();
|
| }
|
|
|
| +bool LocalFrameClientImpl::IsLoadedAsMHTMLArchive() const {
|
| + WebFrame* parent_frame = web_frame_->Parent();
|
| + if (!parent_frame)
|
| + return false;
|
| +
|
| + // TODO(nasko): How should this work with OOPIF?
|
| + // The MHTMLArchive is parsed as a whole, but can be constructed from frames
|
| + // in multiple processes. In that case, which process should parse it and how
|
| + // should the output be spread back across multiple processes?
|
| + if (!parent_frame->IsWebLocalFrame())
|
| + return false;
|
| +
|
| + return ToWebLocalFrameImpl(parent_frame)
|
| + ->GetFrame()
|
| + ->Loader()
|
| + .GetDocumentLoader()
|
| + ->Fetcher()
|
| + ->Archive();
|
| +}
|
| +
|
| KURL LocalFrameClientImpl::OverrideFlashEmbedWithHTML(const KURL& url) {
|
| return web_frame_->Client()->OverrideFlashEmbedWithHTML(WebURL(url));
|
| }
|
|
|