| 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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 void DownloadItemImpl::MarkAsComplete() { | 933 void DownloadItemImpl::MarkAsComplete() { |
| 934 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 934 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 935 | 935 |
| 936 DCHECK(all_data_saved_); | 936 DCHECK(all_data_saved_); |
| 937 end_time_ = base::Time::Now(); | 937 end_time_ = base::Time::Now(); |
| 938 TransitionTo(COMPLETE); | 938 TransitionTo(COMPLETE); |
| 939 } | 939 } |
| 940 | 940 |
| 941 void DownloadItemImpl::SetIsPersisted() { | 941 void DownloadItemImpl::SetIsPersisted() { |
| 942 is_persisted_ = true; | 942 is_persisted_ = true; |
| 943 UpdateObservers(); |
| 943 } | 944 } |
| 944 | 945 |
| 945 void DownloadItemImpl::SetDbHandle(int64 handle) { | 946 void DownloadItemImpl::SetDbHandle(int64 handle) { |
| 946 db_handle_ = handle; | 947 db_handle_ = handle; |
| 947 | 948 |
| 948 bound_net_log_.AddEvent( | 949 bound_net_log_.AddEvent( |
| 949 net::NetLog::TYPE_DOWNLOAD_ITEM_IN_HISTORY, | 950 net::NetLog::TYPE_DOWNLOAD_ITEM_IN_HISTORY, |
| 950 net::NetLog::Int64Callback("db_handle", db_handle_)); | 951 net::NetLog::Int64Callback("db_handle", db_handle_)); |
| 951 } | 952 } |
| 952 | 953 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 | 1242 |
| 1242 bound_net_log_.AddEvent( | 1243 bound_net_log_.AddEvent( |
| 1243 net::NetLog::TYPE_DOWNLOAD_ITEM_RENAMED, | 1244 net::NetLog::TYPE_DOWNLOAD_ITEM_RENAMED, |
| 1244 base::Bind(&download_net_logs::ItemRenamedCallback, | 1245 base::Bind(&download_net_logs::ItemRenamedCallback, |
| 1245 ¤t_path_, &new_path)); | 1246 ¤t_path_, &new_path)); |
| 1246 } | 1247 } |
| 1247 | 1248 |
| 1248 | 1249 |
| 1249 | 1250 |
| 1250 | 1251 |
| OLD | NEW |