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

Issue 1977303003: Adds a feature to MHTML serialization that omits subframes and subresources marked no-store. (Closed)

Created:
4 years, 7 months ago by dewittj
Modified:
4 years, 7 months ago
CC:
dcheng, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, jam, Nate Chapin, loading-reviews+fetch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-blink_chromium.org, nasko+codewatch_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@no-store
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adds a feature to MHTML serialization that omits subframes and subresources marked no-store. Also integrates this new feature with the offline page archiver. Note that because CSS is not considered a resource when serializing, CSS will be covered separately. BUG=609566 Committed: https://crrev.com/a8f8297de77fc3688e05b459f0cb6448209ad2ea Cr-Commit-Position: refs/heads/master@{#395380}

Patch Set 1 #

Patch Set 2 : Integrate with offline pages archiver. #

Total comments: 6

Patch Set 3 : Adds some tests. #

Patch Set 4 : #

Total comments: 6

Patch Set 5 : Adds an image subresource to the test. #

Total comments: 18

Patch Set 6 : Adds a test that compares actual visible content. #

Total comments: 14

Patch Set 7 : Address Łukasz comments. #

Total comments: 12

Patch Set 8 : Moar comments. #

Total comments: 24

Patch Set 9 : Address ncarter's comments. #

Patch Set 10 : Address dcheng's comments. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+347 lines, -88 lines) Patch
M chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 1 comment Download
M content/browser/download/mhtml_generation_browsertest.cc View 1 2 3 4 5 6 7 8 9 7 chunks +214 lines, -3 lines 0 comments Download
M content/child/assert_matching_enums.cc View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -10 lines 0 comments Download
M content/common/DEPS View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -2 lines 0 comments Download
M content/public/common/common_param_traits_macros.h View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -3 lines 0 comments Download
M content/public/common/mhtml_generation_params.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -13 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 4 chunks +24 lines, -12 lines 0 comments Download
A + content/test/data/nostore.jpg View 1 2 3 4 Binary file 0 comments Download
A + content/test/data/nostore.jpg.mock-http-headers View 1 2 3 4 0 chunks +-1 lines, --1 lines 0 comments Download
A content/test/data/page_with_nostore_iframe.html View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/FrameSerializer.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameSerializer.cpp View 1 2 3 4 5 6 7 3 chunks +8 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameSerializer.cpp View 1 2 3 4 5 6 7 4 chunks +51 lines, -16 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameSerializer.h View 1 2 3 4 5 6 3 chunks +17 lines, -16 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 34 (14 generated)
Dmitry Titov
https://codereview.chromium.org/1977303003/diff/20001/third_party/WebKit/Source/core/frame/FrameSerializer.h File third_party/WebKit/Source/core/frame/FrameSerializer.h (right): https://codereview.chromium.org/1977303003/diff/20001/third_party/WebKit/Source/core/frame/FrameSerializer.h#newcode90 third_party/WebKit/Source/core/frame/FrameSerializer.h:90: virtual bool shouldSkipURL(const KURL&) ShouldSkipResourceWithURL is probably more clear. ...
4 years, 7 months ago (2016-05-17 22:47:11 UTC) #2
dewittj
dimich, łukasza: ptal https://codereview.chromium.org/1977303003/diff/20001/third_party/WebKit/Source/core/frame/FrameSerializer.h File third_party/WebKit/Source/core/frame/FrameSerializer.h (right): https://codereview.chromium.org/1977303003/diff/20001/third_party/WebKit/Source/core/frame/FrameSerializer.h#newcode90 third_party/WebKit/Source/core/frame/FrameSerializer.h:90: virtual bool shouldSkipURL(const KURL&) On 2016/05/17 ...
4 years, 7 months ago (2016-05-17 23:43:27 UTC) #5
Dmitry Titov
https://codereview.chromium.org/1977303003/diff/60001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc (right): https://codereview.chromium.org/1977303003/diff/60001/content/browser/download/mhtml_generation_browsertest.cc#newcode246 content/browser/download/mhtml_generation_browsertest.cc:246: it'd be nice to add a subresource test (css ...
4 years, 7 months ago (2016-05-18 00:18:47 UTC) #6
Łukasz Anforowicz
https://codereview.chromium.org/1977303003/diff/80001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc (right): https://codereview.chromium.org/1977303003/diff/80001/content/browser/download/mhtml_generation_browsertest.cc#newcode202 content/browser/download/mhtml_generation_browsertest.cc:202: IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, Could you please also add a test that ...
4 years, 7 months ago (2016-05-18 17:27:25 UTC) #8
dewittj
https://codereview.chromium.org/1977303003/diff/60001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc (right): https://codereview.chromium.org/1977303003/diff/60001/content/browser/download/mhtml_generation_browsertest.cc#newcode246 content/browser/download/mhtml_generation_browsertest.cc:246: On 2016/05/18 00:18:47, Dmitry Titov wrote: > it'd be ...
4 years, 7 months ago (2016-05-19 04:13:18 UTC) #9
Łukasz Anforowicz
https://codereview.chromium.org/1977303003/diff/80001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc (right): https://codereview.chromium.org/1977303003/diff/80001/content/browser/download/mhtml_generation_browsertest.cc#newcode202 content/browser/download/mhtml_generation_browsertest.cc:202: IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, On 2016/05/19 04:13:17, dewittj wrote: > On 2016/05/18 ...
4 years, 7 months ago (2016-05-19 17:00:14 UTC) #15
dewittj
Thanks, Łukasz. PTAL. Adding additional reviewers: nick: content/ dcheng: webkit (or wait for łukasza to ...
4 years, 7 months ago (2016-05-19 18:18:36 UTC) #16
Łukasz Anforowicz
Thanks - this is really close, but I think might need one more iteration (for ...
4 years, 7 months ago (2016-05-19 18:50:18 UTC) #18
dewittj
https://codereview.chromium.org/1977303003/diff/120001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1977303003/diff/120001/content/renderer/render_frame_impl.cc#newcode4986 content/renderer/render_frame_impl.cc:4986: if (file.WriteAtCurrentPos(data.data(), data.size()) < 0) { On 2016/05/19 18:50:17, ...
4 years, 7 months ago (2016-05-19 19:44:55 UTC) #19
Łukasz Anforowicz
lgtm https://codereview.chromium.org/1977303003/diff/120001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1977303003/diff/120001/content/renderer/render_frame_impl.cc#newcode4986 content/renderer/render_frame_impl.cc:4986: if (file.WriteAtCurrentPos(data.data(), data.size()) < 0) { On 2016/05/19 ...
4 years, 7 months ago (2016-05-19 19:51:25 UTC) #20
ncarter (slow)
content lgtm w/ some style nits https://codereview.chromium.org/1977303003/diff/140001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc (right): https://codereview.chromium.org/1977303003/diff/140001/content/browser/download/mhtml_generation_browsertest.cc#newcode45 content/browser/download/mhtml_generation_browsertest.cc:45: // Returns number ...
4 years, 7 months ago (2016-05-19 23:36:35 UTC) #21
dewittj
https://codereview.chromium.org/1977303003/diff/140001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc (right): https://codereview.chromium.org/1977303003/diff/140001/content/browser/download/mhtml_generation_browsertest.cc#newcode45 content/browser/download/mhtml_generation_browsertest.cc:45: // Returns number of result. On 2016/05/19 23:36:35, ncarter ...
4 years, 7 months ago (2016-05-20 16:46:03 UTC) #22
dewittj
dcheng: ping
4 years, 7 months ago (2016-05-20 18:38:34 UTC) #23
dcheng
https://codereview.chromium.org/1977303003/diff/140001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc (right): https://codereview.chromium.org/1977303003/diff/140001/content/browser/download/mhtml_generation_browsertest.cc#newcode39 content/browser/download/mhtml_generation_browsertest.cc:39: // requested it. I think this comment might be ...
4 years, 7 months ago (2016-05-20 20:25:02 UTC) #24
dewittj
ncarter: FYI I changed content's DEPS to allow WebFrameSerializerCacheControlPolicy, just an enum. https://codereview.chromium.org/1977303003/diff/140001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc ...
4 years, 7 months ago (2016-05-20 21:22:22 UTC) #25
dcheng
lgtm
4 years, 7 months ago (2016-05-20 21:28:00 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1977303003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1977303003/180001
4 years, 7 months ago (2016-05-23 16:14:58 UTC) #29
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 7 months ago (2016-05-23 19:04:58 UTC) #31
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/a8f8297de77fc3688e05b459f0cb6448209ad2ea Cr-Commit-Position: refs/heads/master@{#395380}
4 years, 7 months ago (2016-05-23 19:06:27 UTC) #33
ncarter (slow)
4 years, 7 months ago (2016-05-23 23:00:30 UTC) #34
Message was sent while issue was closed.
https://codereview.chromium.org/1977303003/diff/180001/content/browser/DEPS
File content/browser/DEPS (right):

https://codereview.chromium.org/1977303003/diff/180001/content/browser/DEPS#n...
content/browser/DEPS:89:
"+third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h",
This is fine.

Powered by Google App Engine
This is Rietveld 408576698