summaryrefslogtreecommitdiffstats
path: root/content/public/browser/download_interrupt_reason_values.h
blob: 92687b636f04ea831fbc8a1db4cebefdbc8477d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Copyright (c) 2011 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.

// Note that the embedder is welcome to persist these values across
// invocations of the browser, and possibly across browser versions.
// Thus individual errors may be deprecated and new errors added, but
// the values of particular errors should not be changed.

// File errors.

// Generic file operation failure.
// "File Error".
INTERRUPT_REASON(FILE_FAILED, 1)

// The file cannot be accessed due to security restrictions.
// "Access Denied".
INTERRUPT_REASON(FILE_ACCESS_DENIED, 2)

// There is not enough room on the drive.
// "Disk Full".
INTERRUPT_REASON(FILE_NO_SPACE, 3)

// The directory or file name is too long.
// "Path Too Long".
INTERRUPT_REASON(FILE_NAME_TOO_LONG, 5)

// The file is too large for the file system to handle.
// "File Too Large".
INTERRUPT_REASON(FILE_TOO_LARGE, 6)

// The file contains a virus.
// "Virus".
INTERRUPT_REASON(FILE_VIRUS_INFECTED, 7)

// The file was in use.
// Too many files are opened at once.
// We have run out of memory.
// "Temporary Problem".
INTERRUPT_REASON(FILE_TRANSIENT_ERROR, 10)

// The file was blocked due to local policy.
// "Blocked"
INTERRUPT_REASON(FILE_BLOCKED, 11)

// An attempt to check the safety of the download failed due to unexpected
// reasons. See http://crbug.com/153212.
INTERRUPT_REASON(FILE_SECURITY_CHECK_FAILED, 12)

// An attempt was made to seek past the end of a file in opening
// a file (as part of resuming a previously interrupted download).
INTERRUPT_REASON(FILE_TOO_SHORT, 13)

// Network errors.

// Generic network failure.
// "Network Error".
INTERRUPT_REASON(NETWORK_FAILED, 20)

// The network operation timed out.
// "Operation Timed Out".
INTERRUPT_REASON(NETWORK_TIMEOUT, 21)

// The network connection has been lost.
// "Connection Lost".
INTERRUPT_REASON(NETWORK_DISCONNECTED, 22)

// The server has gone down.
// "Server Down".
INTERRUPT_REASON(NETWORK_SERVER_DOWN, 23)

// The network request was invalid. This may be due to the original URL or a
// redirected URL:
// - Having an unsupported scheme.
// - Being an invalid URL.
// - Being disallowed by policy.
INTERRUPT_REASON(NETWORK_INVALID_REQUEST, 24)

// Server responses.

// The server indicates that the operation has failed (generic).
// "Server Error".
INTERRUPT_REASON(SERVER_FAILED, 30)

// The server does not support range requests.
// Internal use only:  must restart from the beginning.
INTERRUPT_REASON(SERVER_NO_RANGE, 31)

// The download request does not meet the specified precondition.
// Internal use only:  the file has changed on the server.
INTERRUPT_REASON(SERVER_PRECONDITION, 32)

// The server does not have the requested data.
// "Unable to get file".
INTERRUPT_REASON(SERVER_BAD_CONTENT, 33)

// Server didn't authorize access to resource.
INTERRUPT_REASON(SERVER_UNAUTHORIZED, 34)

// Server certificate problem.
INTERRUPT_REASON(SERVER_CERT_PROBLEM, 35)

// Server access forbidden.
INTERRUPT_REASON(SERVER_FORBIDDEN, 36)

// User input.

// The user canceled the download.
// "Canceled".
INTERRUPT_REASON(USER_CANCELED, 40)

// The user shut down the browser.
// Internal use only:  resume pending downloads if possible.
INTERRUPT_REASON(USER_SHUTDOWN, 41)


// Crash.

// The browser crashed.
// Internal use only:  resume pending downloads if possible.
INTERRUPT_REASON(CRASH, 50)