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

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: Minor changes. 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
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..67c10b4228581ea9772f898468b6a0f504c4db57
--- /dev/null
+++ b/content/common/download/mhtml_save_status.h
@@ -0,0 +1,45 @@
+// 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_EXIST,
Łukasz Anforowicz 2016/11/22 19:22:13 nit: FRAME_NO_LONGER_EXISTS
carlosk 2016/11/22 23:26:24 Done.
+
+ // A frame was not allowed to be serialized by either policy or cache control.
Łukasz Anforowicz 2016/11/22 19:22:13 nit: s/A frame/The main frame/ ?
carlosk 2016/11/22 23:26:23 Done.
+ // 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. Add new result types only
+ // immediately above this line. Make sure to update the corresponding
+ // histogram enum accordingly.
+ STATUS_COUNT,
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_DOWNLOAD_MHTML_SAVE_STATUS_H_

Powered by Google App Engine
This is Rietveld 408576698