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
Review-Url: https://codereview.chromium.org/2519273002
Cr-Commit-Position: refs/heads/master@{#434783}
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index fab083e..49f6472 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -97,6 +97,8 @@
"dom_storage/dom_storage_map.cc",
"dom_storage/dom_storage_map.h",
"dom_storage/dom_storage_messages.h",
+ "download/mhtml_save_status.cc",
+ "download/mhtml_save_status.h",
"drag_event_source_info.h",
"drag_messages.h",
"drag_traits.h",