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

Issue 1899803002: Offline Pages: Use 'binary encoding' to create MHTML, instead of base64. (Closed)

Created:
4 years, 8 months ago by dewittj
Modified:
4 years, 8 months ago
CC:
chromium-reviews, asanka, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, dimich+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Offline Pages: Use 'binary encoding' to create MHTML, instead of base64. This results in a 33% space savings for images stored alongside MHTML. This patch preserves the existing behavior for other creators of MHTML, the extension API and the 'save as' dialog (which is behind a flag). BUG=604413 Committed: https://crrev.com/3287e2051f82e1aa8c5daab8ed19e2a17a2b07e2 Cr-Commit-Position: refs/heads/master@{#388638}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use HasSubstr instead of ContainsRegex when appropriate. #

Total comments: 12

Patch Set 3 : Address nasko's comments #

Total comments: 2

Patch Set 4 : Final nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -15 lines) Patch
M android_webview/native/aw_contents.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/page_capture/page_capture_api.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/download/mhtml_generation_browsertest.cc View 1 2 3 5 chunks +62 lines, -5 lines 0 comments Download
M content/browser/download/mhtml_generation_manager.h View 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/download/mhtml_generation_manager.cc View 6 chunks +12 lines, -2 lines 0 comments Download
M content/browser/download/save_package.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M content/common/frame_messages.h View 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
A + content/test/data/blank.jpg View Binary file 0 comments Download
A content/test/data/page_with_image.html View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (12 generated)
dewittj
dimich: Wondering if this seems like the right way to plumb this option through to ...
4 years, 8 months ago (2016-04-18 21:01:26 UTC) #3
dewittj
ping
4 years, 8 months ago (2016-04-19 20:15:23 UTC) #4
Dmitry Titov
lgtm with a nit: https://codereview.chromium.org/1899803002/diff/60001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc (right): https://codereview.chromium.org/1899803002/diff/60001/content/browser/download/mhtml_generation_browsertest.cc#newcode122 content/browser/download/mhtml_generation_browsertest.cc:122: EXPECT_THAT(mhtml, ContainsRegex("Content-Transfer-Encoding: base64")); Is there ...
4 years, 8 months ago (2016-04-19 22:45:46 UTC) #5
dewittj
nasko: PTAL; you seem to have the broadest coverage here, ptal at the whole patch ...
4 years, 8 months ago (2016-04-19 23:24:40 UTC) #10
nasko
Looks good overall, just some minor comments. https://codereview.chromium.org/1899803002/diff/80001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc (right): https://codereview.chromium.org/1899803002/diff/80001/content/browser/download/mhtml_generation_browsertest.cc#newcode112 content/browser/download/mhtml_generation_browsertest.cc:112: IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, GenerateNonBinaryMHTMLWithImage) ...
4 years, 8 months ago (2016-04-20 17:01:15 UTC) #12
dewittj
rdevlin.cronin: page_capture_api.cc michaelbai: aw_contents.cc PTAL, thanks. https://codereview.chromium.org/1899803002/diff/80001/content/browser/download/mhtml_generation_browsertest.cc File content/browser/download/mhtml_generation_browsertest.cc (right): https://codereview.chromium.org/1899803002/diff/80001/content/browser/download/mhtml_generation_browsertest.cc#newcode112 content/browser/download/mhtml_generation_browsertest.cc:112: IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, GenerateNonBinaryMHTMLWithImage) { ...
4 years, 8 months ago (2016-04-20 20:20:59 UTC) #14
nasko
content/ LGTM with a couple of nits. https://codereview.chromium.org/1899803002/diff/80001/content/browser/download/save_package.cc File content/browser/download/save_package.cc (right): https://codereview.chromium.org/1899803002/diff/80001/content/browser/download/save_package.cc#newcode342 content/browser/download/save_package.cc:342: saved_main_file_path_, /* ...
4 years, 8 months ago (2016-04-20 22:22:38 UTC) #15
Devlin
extensions lgtm
4 years, 8 months ago (2016-04-20 22:29:45 UTC) #16
michaelbai
lgtm
4 years, 8 months ago (2016-04-20 22:30:04 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1899803002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1899803002/120001
4 years, 8 months ago (2016-04-20 23:16:49 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:120001)
4 years, 8 months ago (2016-04-21 00:33:38 UTC) #22
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:29:11 UTC) #24
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/3287e2051f82e1aa8c5daab8ed19e2a17a2b07e2
Cr-Commit-Position: refs/heads/master@{#388638}

Powered by Google App Engine
This is Rietveld 408576698