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" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 if (IsComplete()) | 146 if (IsComplete()) |
147 all_data_saved_ = true; | 147 all_data_saved_ = true; |
148 Init(false /* not actively downloading */); | 148 Init(false /* not actively downloading */); |
149 } | 149 } |
150 | 150 |
151 // Constructing for a regular download: | 151 // Constructing for a regular download: |
152 DownloadItem::DownloadItem(DownloadManager* download_manager, | 152 DownloadItem::DownloadItem(DownloadManager* download_manager, |
153 const DownloadCreateInfo& info, | 153 const DownloadCreateInfo& info, |
154 bool is_otr) | 154 bool is_otr) |
155 : state_info_(info.original_name, info.save_info.file_path, | 155 : state_info_(info.original_name, info.save_info.file_path, |
156 info.has_user_gesture, info.prompt_user_for_save_location, | 156 info.has_user_gesture, info.transition_type, |
157 info.path_uniquifier, false, false, | 157 info.prompt_user_for_save_location, info.path_uniquifier, |
158 info.is_extension_install), | 158 false, false, info.is_extension_install), |
159 request_handle_(info.request_handle), | 159 request_handle_(info.request_handle), |
160 download_id_(info.download_id), | 160 download_id_(info.download_id), |
161 full_path_(info.path), | 161 full_path_(info.path), |
162 url_chain_(info.url_chain), | 162 url_chain_(info.url_chain), |
163 referrer_url_(info.referrer_url), | 163 referrer_url_(info.referrer_url), |
164 suggested_filename_(UTF16ToUTF8(info.save_info.suggested_name)), | 164 suggested_filename_(UTF16ToUTF8(info.save_info.suggested_name)), |
165 content_disposition_(info.content_disposition), | 165 content_disposition_(info.content_disposition), |
166 mime_type_(info.mime_type), | 166 mime_type_(info.mime_type), |
167 original_mime_type_(info.original_mime_type), | 167 original_mime_type_(info.original_mime_type), |
168 referrer_charset_(info.referrer_charset), | 168 referrer_charset_(info.referrer_charset), |
(...skipping 687 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 |