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

Issue 2519273002: Fail when saving page as MHTML provides information about the cause. (Closed)

Created:
4 years, 1 month ago by carlosk
Modified:
4 years ago
CC:
chromium-reviews, asanka, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, asvitkine+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fail when saving page as MHTML provides information about the cause. This change adds more detailed information to tracing and UMA histograms about the reason why a MHTML save operation has failed. This will help us understand why some specific pages consistently fail and better handle these situations. It introduces a new enum, MhtmlSaveStatus, that lists all tracked causes. Part of the reasons are tracked by the browser and the others by the render process but the reporting is centralized in the former. A few tests from MHTMLGenerationTest were also changed to verify the MHTML failures they test for are correctly reported. BUG=645686, 655723, 655708 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576 Cr-Commit-Position: refs/heads/master@{#434783}

Patch Set 1 #

Patch Set 2 : Minor changes. #

Total comments: 10

Patch Set 3 : Rebase (but I only realized later the build errors are not due to patching) #

Patch Set 4 : Addressed code review comments. #

Total comments: 8

Patch Set 5 : Addressed code review comments. #

Patch Set 6 : Updated how the last enum value is represented. #

Total comments: 2

Patch Set 7 : Fixed typo. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -53 lines) Patch
M content/browser/download/mhtml_generation_browsertest.cc View 1 2 3 8 chunks +20 lines, -0 lines 0 comments Download
M content/browser/download/mhtml_generation_manager.h View 3 chunks +4 lines, -4 lines 0 comments Download
M content/browser/download/mhtml_generation_manager.cc View 1 2 3 4 5 11 chunks +36 lines, -29 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/content_param_traits_macros.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
A content/common/download/mhtml_save_status.h View 1 2 3 4 5 6 1 chunk +49 lines, -0 lines 0 comments Download
A content/common/download/mhtml_save_status.cc View 1 2 3 4 5 1 chunk +32 lines, -0 lines 0 comments Download
M content/common/frame_messages.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 8 chunks +18 lines, -15 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 2 chunks +16 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 38 (22 generated)
carlosk
isherman@: Please review histograms.xml and UMA related changes. lukasza@: Please review changes in MHTML generation ...
4 years, 1 month ago (2016-11-22 18:37:12 UTC) #9
Łukasz Anforowicz
LGTM with some nits. Please loop me in when you gather the UMA results - ...
4 years, 1 month ago (2016-11-22 19:22:13 UTC) #12
Ilya Sherman
metrics lgtm
4 years, 1 month ago (2016-11-22 22:38:36 UTC) #13
carlosk
Thanks. The Android build failures were not related to my patch. Lets see if they ...
4 years, 1 month ago (2016-11-22 23:26:24 UTC) #16
nasko
https://codereview.chromium.org/2519273002/diff/60001/content/common/content_param_traits_macros.h File content/common/content_param_traits_macros.h (right): https://codereview.chromium.org/2519273002/diff/60001/content/common/content_param_traits_macros.h#newcode39 content/common/content_param_traits_macros.h:39: static_cast<int>(content::MhtmlSaveStatus::STATUS_COUNT) - 1) Why the need for static casting? ...
4 years ago (2016-11-23 18:07:35 UTC) #19
carlosk
Thanks. https://codereview.chromium.org/2519273002/diff/60001/content/common/content_param_traits_macros.h File content/common/content_param_traits_macros.h (right): https://codereview.chromium.org/2519273002/diff/60001/content/common/content_param_traits_macros.h#newcode39 content/common/content_param_traits_macros.h:39: static_cast<int>(content::MhtmlSaveStatus::STATUS_COUNT) - 1) On 2016/11/23 18:07:34, nasko wrote: ...
4 years ago (2016-11-23 20:08:40 UTC) #20
nasko
https://codereview.chromium.org/2519273002/diff/60001/content/common/content_param_traits_macros.h File content/common/content_param_traits_macros.h (right): https://codereview.chromium.org/2519273002/diff/60001/content/common/content_param_traits_macros.h#newcode39 content/common/content_param_traits_macros.h:39: static_cast<int>(content::MhtmlSaveStatus::STATUS_COUNT) - 1) On 2016/11/23 20:08:40, carlosk wrote: > ...
4 years ago (2016-11-24 00:07:31 UTC) #21
carlosk
https://codereview.chromium.org/2519273002/diff/60001/content/common/content_param_traits_macros.h File content/common/content_param_traits_macros.h (right): https://codereview.chromium.org/2519273002/diff/60001/content/common/content_param_traits_macros.h#newcode39 content/common/content_param_traits_macros.h:39: static_cast<int>(content::MhtmlSaveStatus::STATUS_COUNT) - 1) On 2016/11/24 00:07:31, nasko wrote: > ...
4 years ago (2016-11-24 00:21:12 UTC) #22
nasko
LGTM with a nit. https://codereview.chromium.org/2519273002/diff/100001/content/common/download/mhtml_save_status.h File content/common/download/mhtml_save_status.h (right): https://codereview.chromium.org/2519273002/diff/100001/content/common/download/mhtml_save_status.h#newcode37 content/common/download/mhtml_save_status.h:37: // NOTE: always keep this ...
4 years ago (2016-11-24 00:24:57 UTC) #23
carlosk
Thanks. https://codereview.chromium.org/2519273002/diff/100001/content/common/download/mhtml_save_status.h File content/common/download/mhtml_save_status.h (right): https://codereview.chromium.org/2519273002/diff/100001/content/common/download/mhtml_save_status.h#newcode37 content/common/download/mhtml_save_status.h:37: // NOTE: always keep this entry at the ...
4 years ago (2016-11-24 00:28:13 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2519273002/120001
4 years ago (2016-11-24 00:29:31 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_amd64-generic_chromium_compile_only_ng on ...
4 years ago (2016-11-24 02:30:41 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2519273002/120001
4 years ago (2016-11-24 03:04:41 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/240695)
4 years ago (2016-11-24 04:21:21 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2519273002/120001
4 years ago (2016-11-28 21:18:37 UTC) #35
commit-bot: I haz the power
4 years ago (2016-11-29 00:04:41 UTC) #38
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576
Cr-Commit-Position: refs/heads/master@{#434783}

Powered by Google App Engine
This is Rietveld 408576698