| Index: content/public/common/mhtml_generation.cc
|
| diff --git a/content/public/common/mhtml_generation.cc b/content/public/common/mhtml_generation.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e52b297c010aa0fbe1aa24bfab92600f1cce6407
|
| --- /dev/null
|
| +++ b/content/public/common/mhtml_generation.cc
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/public/common/mhtml_generation.h"
|
| +
|
| +#include "base/files/file_path.h"
|
| +
|
| +namespace content {
|
| +
|
| +MHTMLGenerationParams::MHTMLGenerationParams(const base::FilePath& file_path)
|
| + : file_path(file_path) {}
|
| +
|
| +namespace mhtml {
|
| +
|
| +blink::WebFrameSerializer::CacheControlPolicy toCacheControlPolicy(
|
| + MHTMLCacheControlPolicy mhtml_policy) {
|
| + switch (mhtml_policy) {
|
| + case MHTMLCacheControlPolicy::IGNORE:
|
| + return blink::WebFrameSerializer::CacheControlPolicyIgnore;
|
| + case MHTMLCacheControlPolicy::FAIL_FOR_NO_STORE_MAIN_FRAME:
|
| + return blink::WebFrameSerializer::
|
| + CacheControlPolicyFailForNoStoreMainFrame;
|
| + default:
|
| + NOTREACHED();
|
| + return blink::WebFrameSerializer::CacheControlPolicyIgnore;
|
| + }
|
| +}
|
| +
|
| +} // namespace mhtml
|
| +
|
| +} // namespace content
|
|
|