OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // File method ordering: Methods in this file are in the same order as | 5 // File method ordering: Methods in this file are in the same order as |
6 // in download_item_impl.h, with the following exception: The public | 6 // in download_item_impl.h, with the following exception: The public |
7 // interfaces Start, MaybeCompleteDownload, and OnDownloadCompleting | 7 // interface Start is placed in chronological order with the other |
8 // are placed in chronological order with the other (private) routines | 8 // (private) routines that together define a DownloadItem's state |
9 // that together define a DownloadItem's state transitions | 9 // transitions as the download progresses. See "Download progression |
10 // as the download progresses. See "Download progression cascade" later in | 10 // cascade" later in this file. |
11 // this file. | |
12 | 11 |
13 // A regular DownloadItem (created for a download in this session of the | 12 // A regular DownloadItem (created for a download in this session of the |
14 // browser) normally goes through the following states: | 13 // browser) normally goes through the following states: |
15 // * Created (when download starts) | 14 // * Created (when download starts) |
16 // * Destination filename determined | 15 // * Destination filename determined |
17 // * Entered into the history database. | 16 // * Entered into the history database. |
18 // * Made visible in the download shelf. | 17 // * Made visible in the download shelf. |
19 // * All the data is saved. Note that the actual data download occurs | 18 // * All the data is saved. Note that the actual data download occurs |
20 // in parallel with the above steps, but until those steps are | 19 // in parallel with the above steps, but until those steps are |
21 // complete, the state of the data save will be ignored. | 20 // complete, the state of the data save will be ignored. |
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 return "CANCELLED"; | 1414 return "CANCELLED"; |
1416 case INTERRUPTED_INTERNAL: | 1415 case INTERRUPTED_INTERNAL: |
1417 return "INTERRUPTED"; | 1416 return "INTERRUPTED"; |
1418 default: | 1417 default: |
1419 NOTREACHED() << "Unknown download state " << state; | 1418 NOTREACHED() << "Unknown download state " << state; |
1420 return "unknown"; | 1419 return "unknown"; |
1421 }; | 1420 }; |
1422 } | 1421 } |
1423 | 1422 |
1424 } // namespace content | 1423 } // namespace content |
OLD | NEW |