Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/common/download/mhtml_save_status.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 #include "base/strings/stringprintf.h" | |
|
nasko
2016/11/23 18:07:34
Why is this include needed?
carlosk
2016/11/23 20:08:40
My mistake. Removed.
| |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 const char* GetMhtmlSaveStatusLabel(MhtmlSaveStatus save_status) { | |
| 13 switch (save_status) { | |
| 14 case MhtmlSaveStatus::SUCCESS: | |
| 15 return "Success"; | |
| 16 case MhtmlSaveStatus::FILE_CLOSING_ERROR: | |
| 17 return "File closing error"; | |
| 18 case MhtmlSaveStatus::FILE_CREATION_ERROR: | |
| 19 return "File creation error"; | |
| 20 case MhtmlSaveStatus::FILE_WRITTING_ERROR: | |
| 21 return "File writing error"; | |
| 22 case MhtmlSaveStatus::FRAME_NO_LONGER_EXISTS: | |
| 23 return "Frame no longer exists"; | |
| 24 case MhtmlSaveStatus::FRAME_SERIALIZATION_FORBIDDEN: | |
| 25 return "Main frame serialization forbidden"; | |
| 26 case MhtmlSaveStatus::RENDER_PROCESS_EXITED: | |
| 27 return "Render process no longer exists"; | |
| 28 case MhtmlSaveStatus::STATUS_COUNT: | |
| 29 break; | |
| 30 } | |
| 31 NOTREACHED(); | |
| 32 return "INVALID STATUS"; | |
|
nasko
2016/11/23 18:07:34
Keep strings consistent - you don't use all caps a
carlosk
2016/11/23 20:08:40
This seemed like a big enough error case to flag i
| |
| 33 } | |
| 34 | |
| 35 } // namespace content | |
| OLD | NEW |