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

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

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/download/mhtml_save_status.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/download/mhtml_save_status.cc
diff --git a/content/common/download/mhtml_save_status.cc b/content/common/download/mhtml_save_status.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e6cea2ab761997090e5f3b119ba6ae2feda43db9
--- /dev/null
+++ b/content/common/download/mhtml_save_status.cc
@@ -0,0 +1,32 @@
+// 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.
+
+#include "content/common/download/mhtml_save_status.h"
+
+#include "base/logging.h"
+
+namespace content {
+
+const char* GetMhtmlSaveStatusLabel(MhtmlSaveStatus save_status) {
+ switch (save_status) {
+ case MhtmlSaveStatus::SUCCESS:
+ return "Success";
+ case MhtmlSaveStatus::FILE_CLOSING_ERROR:
+ return "File closing error";
+ case MhtmlSaveStatus::FILE_CREATION_ERROR:
+ return "File creation error";
+ case MhtmlSaveStatus::FILE_WRITTING_ERROR:
+ return "File writing error";
+ case MhtmlSaveStatus::FRAME_NO_LONGER_EXISTS:
+ return "Frame no longer exists";
+ case MhtmlSaveStatus::FRAME_SERIALIZATION_FORBIDDEN:
+ return "Main frame serialization forbidden";
+ case MhtmlSaveStatus::RENDER_PROCESS_EXITED:
+ return "Render process no longer exists";
+ }
+ NOTREACHED();
+ return "<Invalid status>";
+}
+
+} // namespace content
« no previous file with comments | « content/common/download/mhtml_save_status.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698