Home | History | Annotate | Download | only in browser
      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.
      4 
      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.
      9 
     10 // File errors.
     11 
     12 // Generic file operation failure.
     13 // "File Error".
     14 INTERRUPT_REASON(FILE_FAILED, 1)
     15 
     16 // The file cannot be accessed due to security restrictions.
     17 // The file cannot be accessed.
     18 // "Access Denied".
     19 INTERRUPT_REASON(FILE_ACCESS_DENIED, 2)
     20 
     21 // There is not enough room on the drive.
     22 // "Disk Full".
     23 INTERRUPT_REASON(FILE_NO_SPACE, 3)
     24 
     25 // The directory or file name is too long.
     26 // "Path Too Long".
     27 INTERRUPT_REASON(FILE_NAME_TOO_LONG, 5)
     28 
     29 // The file is too large for the file system to handle.
     30 // "File Too Large".
     31 INTERRUPT_REASON(FILE_TOO_LARGE, 6)
     32 
     33 // The file contains a virus.
     34 // "Virus".
     35 INTERRUPT_REASON(FILE_VIRUS_INFECTED, 7)
     36 
     37 // The file was in use.
     38 // Too many files are opened at once.
     39 // We have run out of memory.
     40 // "Temporary Problem".
     41 INTERRUPT_REASON(FILE_TRANSIENT_ERROR, 10)
     42 
     43 // The file was blocked due to local policy.
     44 // "Blocked"
     45 INTERRUPT_REASON(FILE_BLOCKED, 11)
     46 
     47 // An attempt to check the safety of the download failed due to unexpected
     48 // reasons. See http://crbug.com/153212.
     49 INTERRUPT_REASON(FILE_SECURITY_CHECK_FAILED, 12)
     50 
     51 // An attempt was made to seek past the end of a file in opening
     52 // a file (as part of resuming a previously interrupted download).
     53 INTERRUPT_REASON(FILE_TOO_SHORT, 13)
     54 
     55 // Network errors.
     56 
     57 // Generic network failure.
     58 // "Network Error".
     59 INTERRUPT_REASON(NETWORK_FAILED, 20)
     60 
     61 // The network operation timed out.
     62 // "Operation Timed Out".
     63 INTERRUPT_REASON(NETWORK_TIMEOUT, 21)
     64 
     65 // The network connection has been lost.
     66 // "Connection Lost".
     67 INTERRUPT_REASON(NETWORK_DISCONNECTED, 22)
     68 
     69 // The server has gone down.
     70 // "Server Down".
     71 INTERRUPT_REASON(NETWORK_SERVER_DOWN, 23)
     72 
     73 // The network request was invalid. This may be due to the original URL or a
     74 // redirected URL:
     75 // - Having an unsupported scheme.
     76 // - Being an invalid URL.
     77 // - Being disallowed by policy.
     78 INTERRUPT_REASON(NETWORK_INVALID_REQUEST, 24)
     79 
     80 // Server responses.
     81 
     82 // The server indicates that the operation has failed (generic).
     83 // "Server Error".
     84 INTERRUPT_REASON(SERVER_FAILED, 30)
     85 
     86 // The server does not support range requests.
     87 // Internal use only:  must restart from the beginning.
     88 INTERRUPT_REASON(SERVER_NO_RANGE, 31)
     89 
     90 // The download request does not meet the specified precondition.
     91 // Internal use only:  the file has changed on the server.
     92 INTERRUPT_REASON(SERVER_PRECONDITION, 32)
     93 
     94 // The server does not have the requested data.
     95 // "Unable to get file".
     96 INTERRUPT_REASON(SERVER_BAD_CONTENT, 33)
     97 
     98 
     99 // User input.
    100 
    101 // The user canceled the download.
    102 // "Canceled".
    103 INTERRUPT_REASON(USER_CANCELED, 40)
    104 
    105 // The user shut down the browser.
    106 // Internal use only:  resume pending downloads if possible.
    107 INTERRUPT_REASON(USER_SHUTDOWN, 41)
    108 
    109 
    110 // Crash.
    111 
    112 // The browser crashed.
    113 // Internal use only:  resume pending downloads if possible.
    114 INTERRUPT_REASON(CRASH, 50)
    115