Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: content/public/common/mhtml_generation.cc

Issue 1947263004: Introduces a new MHTML generation parameter specifying different behvaior for cache-control headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work on compile. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/public/common/mhtml_generation.h"
6
7 #include "base/files/file_path.h"
8
9 namespace content {
10
11 MHTMLGenerationParams::MHTMLGenerationParams(const base::FilePath& file_path)
12 : file_path(file_path) {}
13
14 namespace mhtml {
15
16 blink::WebFrameSerializer::CacheControlPolicy toCacheControlPolicy(
17 MHTMLCacheControlPolicy mhtml_policy) {
18 switch (mhtml_policy) {
19 case MHTMLCacheControlPolicy::IGNORE:
20 return blink::WebFrameSerializer::CacheControlPolicyIgnore;
21 case MHTMLCacheControlPolicy::FAIL_FOR_NO_STORE_MAIN_FRAME:
22 return blink::WebFrameSerializer::
23 CacheControlPolicyFailForNoStoreMainFrame;
24 default:
25 NOTREACHED();
26 return blink::WebFrameSerializer::CacheControlPolicyIgnore;
27 }
28 }
29
30 } // namespace mhtml
31
32 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698