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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/i18n/case_conversion.h" | 10 #include "base/i18n/case_conversion.h" |
11 #include "base/i18n/string_search.h" | 11 #include "base/i18n/string_search.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
14 #include "base/stringprintf.h" | 14 #include "base/stringprintf.h" |
15 #include "base/timer.h" | 15 #include "base/timer.h" |
16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
17 #include "net/base/net_util.h" | 17 #include "net/base/net_util.h" |
18 #include "content/browser/browser_thread.h" | 18 #include "content/browser/browser_thread.h" |
19 #include "content/browser/content_browser_client.h" | |
20 #include "content/browser/download/download_file.h" | 19 #include "content/browser/download/download_file.h" |
21 #include "content/browser/download/download_create_info.h" | 20 #include "content/browser/download/download_create_info.h" |
22 #include "content/browser/download/download_file_manager.h" | 21 #include "content/browser/download/download_file_manager.h" |
23 #include "content/browser/download/download_id.h" | 22 #include "content/browser/download/download_id.h" |
24 #include "content/browser/download/download_manager.h" | 23 #include "content/browser/download/download_manager.h" |
25 #include "content/browser/download/download_manager_delegate.h" | 24 #include "content/browser/download/download_manager_delegate.h" |
26 #include "content/browser/download/download_persistent_store_info.h" | 25 #include "content/browser/download/download_persistent_store_info.h" |
27 #include "content/browser/download/download_request_handle.h" | 26 #include "content/browser/download/download_request_handle.h" |
28 #include "content/browser/download/download_stats.h" | 27 #include "content/browser/download/download_stats.h" |
29 #include "content/browser/download/interrupt_reasons.h" | 28 #include "content/browser/download/interrupt_reasons.h" |
| 29 #include "content/public/browser/content_browser_client.h" |
30 | 30 |
31 // A DownloadItem normally goes through the following states: | 31 // A DownloadItem normally goes through the following states: |
32 // * Created (when download starts) | 32 // * Created (when download starts) |
33 // * Made visible to consumers (e.g. Javascript) after the | 33 // * Made visible to consumers (e.g. Javascript) after the |
34 // destination file has been determined. | 34 // destination file has been determined. |
35 // * Entered into the history database. | 35 // * Entered into the history database. |
36 // * Made visible in the download shelf. | 36 // * Made visible in the download shelf. |
37 // * All data is saved. Note that the actual data download occurs | 37 // * All data is saved. Note that the actual data download occurs |
38 // in parallel with the above steps, but until those steps are | 38 // in parallel with the above steps, but until those steps are |
39 // complete, completion of the data download will be ignored. | 39 // complete, completion of the data download will be ignored. |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 state_info_.target_name.value().c_str(), | 811 state_info_.target_name.value().c_str(), |
812 full_path().value().c_str()); | 812 full_path().value().c_str()); |
813 } else { | 813 } else { |
814 description += base::StringPrintf(" url = \"%s\"", url_list.c_str()); | 814 description += base::StringPrintf(" url = \"%s\"", url_list.c_str()); |
815 } | 815 } |
816 | 816 |
817 description += " }"; | 817 description += " }"; |
818 | 818 |
819 return description; | 819 return description; |
820 } | 820 } |
OLD | NEW |