Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1744)

Side by Side Diff: content/browser/download/download_item_impl.cc

Issue 10916201: Make the SavePackage use of the fake download item cleaner around cancellation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to LKGR (156083) Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 &current_path_, &new_path)); 1251 &current_path_, &new_path));
1251 } 1252 }
1252 1253
1253 1254
1254 1255
1255 1256
OLDNEW
« no previous file with comments | « chrome/browser/download/save_page_browsertest.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698