OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #include "content/browser/download/download_item.h" | 5 #include "content/browser/download/download_item.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "content/browser/download/download_manager.h" | 24 #include "content/browser/download/download_manager.h" |
25 #include "content/browser/download/download_persistent_store_info.h" | 25 #include "content/browser/download/download_persistent_store_info.h" |
26 #include "content/browser/download/download_request_handle.h" | 26 #include "content/browser/download/download_request_handle.h" |
27 #include "content/browser/download/download_stats.h" | 27 #include "content/browser/download/download_stats.h" |
28 #include "content/browser/download/interrupt_reasons.h" | 28 #include "content/browser/download/interrupt_reasons.h" |
29 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
30 #include "content/public/browser/content_browser_client.h" | 30 #include "content/public/browser/content_browser_client.h" |
31 #include "content/public/browser/download_manager_delegate.h" | 31 #include "content/public/browser/download_manager_delegate.h" |
32 #include "net/base/net_util.h" | 32 #include "net/base/net_util.h" |
33 | 33 |
| 34 using content::BrowserThread; |
| 35 |
34 // A DownloadItem normally goes through the following states: | 36 // A DownloadItem normally goes through the following states: |
35 // * Created (when download starts) | 37 // * Created (when download starts) |
36 // * Made visible to consumers (e.g. Javascript) after the | 38 // * Made visible to consumers (e.g. Javascript) after the |
37 // destination file has been determined. | 39 // destination file has been determined. |
38 // * Entered into the history database. | 40 // * Entered into the history database. |
39 // * Made visible in the download shelf. | 41 // * Made visible in the download shelf. |
40 // * All data is saved. Note that the actual data download occurs | 42 // * All data is saved. Note that the actual data download occurs |
41 // in parallel with the above steps, but until those steps are | 43 // in parallel with the above steps, but until those steps are |
42 // complete, completion of the data download will be ignored. | 44 // complete, completion of the data download will be ignored. |
43 // * Download file is renamed to its final name, and possibly | 45 // * Download file is renamed to its final name, and possibly |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 state_info_.target_name.value().c_str(), | 813 state_info_.target_name.value().c_str(), |
812 full_path().value().c_str()); | 814 full_path().value().c_str()); |
813 } else { | 815 } else { |
814 description += base::StringPrintf(" url = \"%s\"", url_list.c_str()); | 816 description += base::StringPrintf(" url = \"%s\"", url_list.c_str()); |
815 } | 817 } |
816 | 818 |
817 description += " }"; | 819 description += " }"; |
818 | 820 |
819 return description; | 821 return description; |
820 } | 822 } |
OLD | NEW |