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

Unified Diff: content/common/download/mhtml_save_status.h

Issue 2519273002: Fail when saving page as MHTML provides information about the cause. (Closed)
Patch Set: Fixed typo. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/content_param_traits_macros.h ('k') | content/common/download/mhtml_save_status.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/download/mhtml_save_status.h
diff --git a/content/common/download/mhtml_save_status.h b/content/common/download/mhtml_save_status.h
new file mode 100644
index 0000000000000000000000000000000000000000..23b63546c68d521aec724c50988a4548dd92e0d3
--- /dev/null
+++ b/content/common/download/mhtml_save_status.h
@@ -0,0 +1,49 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_DOWNLOAD_MHTML_SAVE_STATUS_H_
+#define CONTENT_COMMON_DOWNLOAD_MHTML_SAVE_STATUS_H_
+
+namespace content {
+
+// Status result enum for MHTML generation.
+enum class MhtmlSaveStatus {
+ SUCCESS = 0,
+
+ // Could not properly close the file where data was written to. Determined by
+ // the browser.
+ FILE_CLOSING_ERROR,
+
+ // Could not create the file that would be written to. Determined by the
+ // browser.
+ FILE_CREATION_ERROR,
+
+ // Could not write serialized data to the file. Determined by the renderer.
+ FILE_WRITTING_ERROR,
+
+ // The DOM changed and a previously existing frame is no more. Determined by
+ // the browser.
+ FRAME_NO_LONGER_EXISTS,
+
+ // The main frame was not allowed to be serialized by either policy or cache
+ // control. Determined by the renderer.
+ FRAME_SERIALIZATION_FORBIDDEN,
+
+ // A render process needed for the serialization of one of the page's frame is
+ // no more. Determined by the browser.
+ RENDER_PROCESS_EXITED,
+
+ // NOTE: always keep this entry at the end and add new status types only
+ // immediately above this line. Set LAST to the new last value and update the
+ // implementation of GetMhtmlSaveStatusLabel. Make sure to update the
+ // corresponding histogram enum accordingly.
+ LAST = RENDER_PROCESS_EXITED,
+};
+
+// Gets a textual representation of the provided MhtmlSaveStatus value.
+const char* GetMhtmlSaveStatusLabel(MhtmlSaveStatus save_status);
+
+} // namespace content
+
+#endif // CONTENT_COMMON_DOWNLOAD_MHTML_SAVE_STATUS_H_
« no previous file with comments | « content/common/content_param_traits_macros.h ('k') | content/common/download/mhtml_save_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698