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 |