Background tracing: Simplify public interface and isolate trigger logic
[chromium-blink-merge.git] / content / public / browser / download_interrupt_reason_values.h
blob92687b636f04ea831fbc8a1db4cebefdbc8477d9
1 // Copyright (c) 2011 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.
5 // Note that the embedder is welcome to persist these values across
6 // invocations of the browser, and possibly across browser versions.
7 // Thus individual errors may be deprecated and new errors added, but
8 // the values of particular errors should not be changed.
10 // File errors.
12 // Generic file operation failure.
13 // "File Error".
14 INTERRUPT_REASON(FILE_FAILED, 1)
16 // The file cannot be accessed due to security restrictions.
17 // "Access Denied".
18 INTERRUPT_REASON(FILE_ACCESS_DENIED, 2)
20 // There is not enough room on the drive.
21 // "Disk Full".
22 INTERRUPT_REASON(FILE_NO_SPACE, 3)
24 // The directory or file name is too long.
25 // "Path Too Long".
26 INTERRUPT_REASON(FILE_NAME_TOO_LONG, 5)
28 // The file is too large for the file system to handle.
29 // "File Too Large".
30 INTERRUPT_REASON(FILE_TOO_LARGE, 6)
32 // The file contains a virus.
33 // "Virus".
34 INTERRUPT_REASON(FILE_VIRUS_INFECTED, 7)
36 // The file was in use.
37 // Too many files are opened at once.
38 // We have run out of memory.
39 // "Temporary Problem".
40 INTERRUPT_REASON(FILE_TRANSIENT_ERROR, 10)
42 // The file was blocked due to local policy.
43 // "Blocked"
44 INTERRUPT_REASON(FILE_BLOCKED, 11)
46 // An attempt to check the safety of the download failed due to unexpected
47 // reasons. See http://crbug.com/153212.
48 INTERRUPT_REASON(FILE_SECURITY_CHECK_FAILED, 12)
50 // An attempt was made to seek past the end of a file in opening
51 // a file (as part of resuming a previously interrupted download).
52 INTERRUPT_REASON(FILE_TOO_SHORT, 13)
54 // Network errors.
56 // Generic network failure.
57 // "Network Error".
58 INTERRUPT_REASON(NETWORK_FAILED, 20)
60 // The network operation timed out.
61 // "Operation Timed Out".
62 INTERRUPT_REASON(NETWORK_TIMEOUT, 21)
64 // The network connection has been lost.
65 // "Connection Lost".
66 INTERRUPT_REASON(NETWORK_DISCONNECTED, 22)
68 // The server has gone down.
69 // "Server Down".
70 INTERRUPT_REASON(NETWORK_SERVER_DOWN, 23)
72 // The network request was invalid. This may be due to the original URL or a
73 // redirected URL:
74 // - Having an unsupported scheme.
75 // - Being an invalid URL.
76 // - Being disallowed by policy.
77 INTERRUPT_REASON(NETWORK_INVALID_REQUEST, 24)
79 // Server responses.
81 // The server indicates that the operation has failed (generic).
82 // "Server Error".
83 INTERRUPT_REASON(SERVER_FAILED, 30)
85 // The server does not support range requests.
86 // Internal use only: must restart from the beginning.
87 INTERRUPT_REASON(SERVER_NO_RANGE, 31)
89 // The download request does not meet the specified precondition.
90 // Internal use only: the file has changed on the server.
91 INTERRUPT_REASON(SERVER_PRECONDITION, 32)
93 // The server does not have the requested data.
94 // "Unable to get file".
95 INTERRUPT_REASON(SERVER_BAD_CONTENT, 33)
97 // Server didn't authorize access to resource.
98 INTERRUPT_REASON(SERVER_UNAUTHORIZED, 34)
100 // Server certificate problem.
101 INTERRUPT_REASON(SERVER_CERT_PROBLEM, 35)
103 // Server access forbidden.
104 INTERRUPT_REASON(SERVER_FORBIDDEN, 36)
106 // User input.
108 // The user canceled the download.
109 // "Canceled".
110 INTERRUPT_REASON(USER_CANCELED, 40)
112 // The user shut down the browser.
113 // Internal use only: resume pending downloads if possible.
114 INTERRUPT_REASON(USER_SHUTDOWN, 41)
117 // Crash.
119 // The browser crashed.
120 // Internal use only: resume pending downloads if possible.
121 INTERRUPT_REASON(CRASH, 50)