| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_impl.h" | 5 #include "content/browser/download/download_item_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 download_net_logs::SRC_HISTORY_IMPORT); | 197 download_net_logs::SRC_HISTORY_IMPORT); |
| 198 } | 198 } |
| 199 | 199 |
| 200 // Constructing for a regular download: | 200 // Constructing for a regular download: |
| 201 DownloadItemImpl::DownloadItemImpl( | 201 DownloadItemImpl::DownloadItemImpl( |
| 202 Delegate* delegate, | 202 Delegate* delegate, |
| 203 const DownloadCreateInfo& info, | 203 const DownloadCreateInfo& info, |
| 204 DownloadRequestHandleInterface* request_handle, | 204 DownloadRequestHandleInterface* request_handle, |
| 205 bool is_otr, | 205 bool is_otr, |
| 206 const net::BoundNetLog& bound_net_log) | 206 const net::BoundNetLog& bound_net_log) |
| 207 : state_info_(info.original_name, info.save_info.file_path, | 207 : state_info_(info.save_info.file_path, |
| 208 info.has_user_gesture, info.transition_type, | 208 info.has_user_gesture, info.transition_type, |
| 209 info.prompt_user_for_save_location), | 209 info.prompt_user_for_save_location), |
| 210 request_handle_(request_handle), | 210 request_handle_(request_handle), |
| 211 download_id_(info.download_id), | 211 download_id_(info.download_id), |
| 212 full_path_(info.path), | |
| 213 url_chain_(info.url_chain), | 212 url_chain_(info.url_chain), |
| 214 referrer_url_(info.referrer_url), | 213 referrer_url_(info.referrer_url), |
| 215 suggested_filename_(UTF16ToUTF8(info.save_info.suggested_name)), | 214 suggested_filename_(UTF16ToUTF8(info.save_info.suggested_name)), |
| 216 content_disposition_(info.content_disposition), | 215 content_disposition_(info.content_disposition), |
| 217 mime_type_(info.mime_type), | 216 mime_type_(info.mime_type), |
| 218 original_mime_type_(info.original_mime_type), | 217 original_mime_type_(info.original_mime_type), |
| 219 referrer_charset_(info.referrer_charset), | 218 referrer_charset_(info.referrer_charset), |
| 220 remote_address_(info.remote_address), | 219 remote_address_(info.remote_address), |
| 221 total_bytes_(info.total_bytes), | 220 total_bytes_(info.total_bytes), |
| 222 received_bytes_(0), | 221 received_bytes_(0), |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 std::map<const void*, ExternalData*>::iterator it = | 1130 std::map<const void*, ExternalData*>::iterator it = |
| 1132 external_data_map_.find(key); | 1131 external_data_map_.find(key); |
| 1133 | 1132 |
| 1134 if (it == external_data_map_.end()) { | 1133 if (it == external_data_map_.end()) { |
| 1135 external_data_map_[key] = data; | 1134 external_data_map_[key] = data; |
| 1136 } else if (it->second != data) { | 1135 } else if (it->second != data) { |
| 1137 delete it->second; | 1136 delete it->second; |
| 1138 it->second = data; | 1137 it->second = data; |
| 1139 } | 1138 } |
| 1140 } | 1139 } |
| OLD | NEW |