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/logging.h" | 11 #include "base/logging.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
14 #include "base/timer.h" | 14 #include "base/timer.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "net/base/net_util.h" | 16 #include "net/base/net_util.h" |
17 #include "chrome/browser/download/download_crx_util.h" | 17 #include "chrome/browser/download/download_crx_util.h" |
18 #include "chrome/browser/download/download_extensions.h" | 18 #include "chrome/browser/download/download_extensions.h" |
19 #include "chrome/browser/download/download_history.h" | 19 #include "chrome/browser/download/download_history.h" |
20 #include "chrome/browser/download/download_manager_delegate.h" | |
21 #include "chrome/browser/download/download_prefs.h" | 20 #include "chrome/browser/download/download_prefs.h" |
22 #include "chrome/browser/download/download_util.h" | 21 #include "chrome/browser/download/download_util.h" |
23 #include "chrome/browser/extensions/crx_installer.h" | 22 #include "chrome/browser/extensions/crx_installer.h" |
24 #include "chrome/browser/history/download_history_info.h" | 23 #include "chrome/browser/history/download_history_info.h" |
25 #include "chrome/browser/platform_util.h" | 24 #include "chrome/browser/platform_util.h" |
26 #include "chrome/browser/prefs/pref_service.h" | 25 #include "chrome/browser/prefs/pref_service.h" |
27 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
28 #include "chrome/common/chrome_notification_types.h" | 27 #include "chrome/common/chrome_notification_types.h" |
29 #include "chrome/common/extensions/extension.h" | 28 #include "chrome/common/extensions/extension.h" |
30 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
31 #include "content/browser/browser_thread.h" | 30 #include "content/browser/browser_thread.h" |
32 #include "content/browser/download/download_create_info.h" | 31 #include "content/browser/download/download_create_info.h" |
33 #include "content/browser/download/download_file_manager.h" | 32 #include "content/browser/download/download_file_manager.h" |
34 #include "content/browser/download/download_manager.h" | 33 #include "content/browser/download/download_manager.h" |
| 34 #include "content/browser/download/download_manager_delegate.h" |
35 #include "content/common/notification_source.h" | 35 #include "content/common/notification_source.h" |
36 | 36 |
37 // A DownloadItem normally goes through the following states: | 37 // A DownloadItem normally goes through the following states: |
38 // * Created (when download starts) | 38 // * Created (when download starts) |
39 // * Made visible to consumers (e.g. Javascript) after the | 39 // * Made visible to consumers (e.g. Javascript) after the |
40 // destination file has been determined. | 40 // destination file has been determined. |
41 // * Entered into the history database. | 41 // * Entered into the history database. |
42 // * Made visible in the download shelf. | 42 // * Made visible in the download shelf. |
43 // * All data is saved. Note that the actual data download occurs | 43 // * All data is saved. Note that the actual data download occurs |
44 // in parallel with the above steps, but until those steps are | 44 // in parallel with the above steps, but until those steps are |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 state_info_.target_name.value().c_str(), | 856 state_info_.target_name.value().c_str(), |
857 full_path().value().c_str()); | 857 full_path().value().c_str()); |
858 } else { | 858 } else { |
859 description += base::StringPrintf(" url = \"%s\"", url_list.c_str()); | 859 description += base::StringPrintf(" url = \"%s\"", url_list.c_str()); |
860 } | 860 } |
861 | 861 |
862 description += " }"; | 862 description += " }"; |
863 | 863 |
864 return description; | 864 return description; |
865 } | 865 } |
OLD | NEW |