| 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 // File method ordering: Methods in this file are in the same order | 5 // File method ordering: Methods in this file are in the same order |
| 6 // as in download_item_impl.h, with the following exception: The public | 6 // as in download_item_impl.h, with the following exception: The public |
| 7 // interfaces DelayedDownloadOpened, OnDownloadTargetDetermined, and | 7 // interfaces DelayedDownloadOpened, OnDownloadTargetDetermined, and |
| 8 // OnDownloadCompleting are placed in chronological order with the other | 8 // OnDownloadCompleting are placed in chronological order with the other |
| 9 // (private) routines that together define a DownloadItem's state transitions | 9 // (private) routines that together define a DownloadItem's state transitions |
| 10 // as the download progresses. See "Download progression cascade" later in | 10 // as the download progresses. See "Download progression cascade" later in |
| (...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 void DownloadItemImpl::MarkAsComplete() { | 938 void DownloadItemImpl::MarkAsComplete() { |
| 939 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 939 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 940 | 940 |
| 941 DCHECK(all_data_saved_); | 941 DCHECK(all_data_saved_); |
| 942 end_time_ = base::Time::Now(); | 942 end_time_ = base::Time::Now(); |
| 943 TransitionTo(COMPLETE); | 943 TransitionTo(COMPLETE); |
| 944 } | 944 } |
| 945 | 945 |
| 946 void DownloadItemImpl::SetIsPersisted() { | 946 void DownloadItemImpl::SetIsPersisted() { |
| 947 is_persisted_ = true; | 947 is_persisted_ = true; |
| 948 UpdateObservers(); |
| 948 } | 949 } |
| 949 | 950 |
| 950 void DownloadItemImpl::SetDbHandle(int64 handle) { | 951 void DownloadItemImpl::SetDbHandle(int64 handle) { |
| 951 db_handle_ = handle; | 952 db_handle_ = handle; |
| 952 | 953 |
| 953 bound_net_log_.AddEvent( | 954 bound_net_log_.AddEvent( |
| 954 net::NetLog::TYPE_DOWNLOAD_ITEM_IN_HISTORY, | 955 net::NetLog::TYPE_DOWNLOAD_ITEM_IN_HISTORY, |
| 955 net::NetLog::Int64Callback("db_handle", db_handle_)); | 956 net::NetLog::Int64Callback("db_handle", db_handle_)); |
| 956 } | 957 } |
| 957 | 958 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 | 1247 |
| 1247 bound_net_log_.AddEvent( | 1248 bound_net_log_.AddEvent( |
| 1248 net::NetLog::TYPE_DOWNLOAD_ITEM_RENAMED, | 1249 net::NetLog::TYPE_DOWNLOAD_ITEM_RENAMED, |
| 1249 base::Bind(&download_net_logs::ItemRenamedCallback, | 1250 base::Bind(&download_net_logs::ItemRenamedCallback, |
| 1250 ¤t_path_, &new_path)); | 1251 ¤t_path_, &new_path)); |
| 1251 } | 1252 } |
| 1252 | 1253 |
| 1253 | 1254 |
| 1254 | 1255 |
| 1255 | 1256 |
| OLD | NEW |