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

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

Issue 2439533002: Download Feedback Service should upload all eligible downloads (Closed)
Patch Set: nit function renaming Created 4 years, 1 month 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
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 as 5 // File method ordering: Methods in this file are in the same order as
6 // in download_item_impl.h, with the following exception: The public 6 // in download_item_impl.h, with the following exception: The public
7 // interface Start is placed in chronological order with the other 7 // interface Start is placed in chronological order with the other
8 // (private) routines that together define a DownloadItem's state 8 // (private) routines that together define a DownloadItem's state
9 // transitions as the download progresses. See "Download progression 9 // transitions as the download progresses. See "Download progression
10 // cascade" later in this file. 10 // cascade" later in this file.
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // may not be in a consistent state or around at all after 295 // may not be in a consistent state or around at all after
296 // invoking observers. http://crbug.com/586610 296 // invoking observers. http://crbug.com/586610
297 297
298 MaybeCompleteDownload(); 298 MaybeCompleteDownload();
299 } 299 }
300 300
301 void DownloadItemImpl::StealDangerousDownload( 301 void DownloadItemImpl::StealDangerousDownload(
302 const AcquireFileCallback& callback) { 302 const AcquireFileCallback& callback) {
303 DVLOG(20) << __func__ << "() download = " << DebugString(true); 303 DVLOG(20) << __func__ << "() download = " << DebugString(true);
304 DCHECK_CURRENTLY_ON(BrowserThread::UI); 304 DCHECK_CURRENTLY_ON(BrowserThread::UI);
305 DCHECK(IsDangerous());
306 305
307 if (download_file_) { 306 if (download_file_) {
308 BrowserThread::PostTaskAndReplyWithResult( 307 BrowserThread::PostTaskAndReplyWithResult(
309 BrowserThread::FILE, 308 BrowserThread::FILE,
310 FROM_HERE, 309 FROM_HERE,
311 base::Bind(&DownloadFileDetach, base::Passed(&download_file_)), 310 base::Bind(&DownloadFileDetach, base::Passed(&download_file_)),
312 callback); 311 callback);
313 } else { 312 } else {
314 callback.Run(current_path_); 313 callback.Run(current_path_);
315 } 314 }
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
2093 case RESUME_MODE_USER_CONTINUE: 2092 case RESUME_MODE_USER_CONTINUE:
2094 return "USER_CONTINUE"; 2093 return "USER_CONTINUE";
2095 case RESUME_MODE_USER_RESTART: 2094 case RESUME_MODE_USER_RESTART:
2096 return "USER_RESTART"; 2095 return "USER_RESTART";
2097 } 2096 }
2098 NOTREACHED() << "Unknown resume mode " << mode; 2097 NOTREACHED() << "Unknown resume mode " << mode;
2099 return "unknown"; 2098 return "unknown";
2100 } 2099 }
2101 2100
2102 } // namespace content 2101 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698