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 #ifndef CONTENT_COMMON_DOWNLOAD_MHTML_SAVE_STATUS_H_ | |
6 #define CONTENT_COMMON_DOWNLOAD_MHTML_SAVE_STATUS_H_ | |
7 | |
8 namespace content { | |
9 | |
10 // Status result enum for MHTML generation. | |
11 enum class MhtmlSaveStatus { | |
12 SUCCESS = 0, | |
13 | |
14 // Could not properly close the file where data was written to. Determined by | |
15 // the browser. | |
16 FILE_CLOSING_ERROR, | |
17 | |
18 // Could not create the file that would be written to. Determined by the | |
19 // browser. | |
20 FILE_CREATION_ERROR, | |
21 | |
22 // Could not write serialized data to the file. Determined by the renderer. | |
23 FILE_WRITTING_ERROR, | |
24 | |
25 // The DOM changed and a previously existing frame is no more. Determined by | |
26 // the browser. | |
27 FRAME_NO_LONGER_EXISTS, | |
28 | |
29 // The main frame was not allowed to be serialized by either policy or cache | |
30 // control. Determined by the renderer. | |
31 FRAME_SERIALIZATION_FORBIDDEN, | |
32 | |
33 // A render process needed for the serialization of one of the page's frame is | |
34 // no more. Determined by the browser. | |
35 RENDER_PROCESS_EXITED, | |
36 | |
37 // NOTE: always keep this entry at the end and Add new status types only | |
nasko
2016/11/24 00:24:57
nit: add
carlosk
2016/11/24 00:28:12
Done.
| |
38 // immediately above this line. Set LAST to the new last value and update the | |
39 // implementation of GetMhtmlSaveStatusLabel. Make sure to update the | |
40 // corresponding histogram enum accordingly. | |
41 LAST = RENDER_PROCESS_EXITED, | |
42 }; | |
43 | |
44 // Gets a textual representation of the provided MhtmlSaveStatus value. | |
45 const char* GetMhtmlSaveStatusLabel(MhtmlSaveStatus save_status); | |
46 | |
47 } // namespace content | |
48 | |
49 #endif // CONTENT_COMMON_DOWNLOAD_MHTML_SAVE_STATUS_H_ | |
OLD | NEW |