OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/download/download_item.h" | 5 #include "chrome/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/logging.h" | 10 #include "base/logging.h" |
11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
12 #include "base/timer.h" | 12 #include "base/timer.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "net/base/net_util.h" | 14 #include "net/base/net_util.h" |
15 #include "chrome/browser/browser_thread.h" | |
16 #include "chrome/browser/download/download_extensions.h" | 15 #include "chrome/browser/download/download_extensions.h" |
17 #include "chrome/browser/download/download_file_manager.h" | 16 #include "chrome/browser/download/download_file_manager.h" |
18 #include "chrome/browser/download/download_history.h" | 17 #include "chrome/browser/download/download_history.h" |
19 #include "chrome/browser/download/download_manager.h" | 18 #include "chrome/browser/download/download_manager.h" |
20 #include "chrome/browser/download/download_prefs.h" | 19 #include "chrome/browser/download/download_prefs.h" |
21 #include "chrome/browser/download/download_util.h" | 20 #include "chrome/browser/download/download_util.h" |
22 #include "chrome/browser/history/download_create_info.h" | 21 #include "chrome/browser/history/download_create_info.h" |
23 #include "chrome/browser/platform_util.h" | 22 #include "chrome/browser/platform_util.h" |
24 #include "chrome/browser/prefs/pref_service.h" | 23 #include "chrome/browser/prefs/pref_service.h" |
25 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
26 #include "chrome/common/extensions/extension.h" | 25 #include "chrome/common/extensions/extension.h" |
27 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
| 27 #include "content/browser/browser_thread.h" |
28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
29 | 29 |
30 // A DownloadItem normally goes through the following states: | 30 // A DownloadItem normally goes through the following states: |
31 // * Created (when download starts) | 31 // * Created (when download starts) |
32 // * Made visible to consumers (e.g. Javascript) after the | 32 // * Made visible to consumers (e.g. Javascript) after the |
33 // destination file has been determined. | 33 // destination file has been determined. |
34 // * Entered into the history database. | 34 // * Entered into the history database. |
35 // * Made visible in the download shelf. | 35 // * Made visible in the download shelf. |
36 // * All data is received. Note that the actual data download occurs | 36 // * All data is received. Note that the actual data download occurs |
37 // in parallel with the above steps, but until those steps are | 37 // in parallel with the above steps, but until those steps are |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 target_name_.value().c_str(), | 609 target_name_.value().c_str(), |
610 full_path().value().c_str()); | 610 full_path().value().c_str()); |
611 } else { | 611 } else { |
612 description += base::StringPrintf(" url = \"%s\"", url().spec().c_str()); | 612 description += base::StringPrintf(" url = \"%s\"", url().spec().c_str()); |
613 } | 613 } |
614 | 614 |
615 description += " }"; | 615 description += " }"; |
616 | 616 |
617 return description; | 617 return description; |
618 } | 618 } |
OLD | NEW |