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

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

Issue 7796014: Make cancel remove cancelled download from active queues at time of cancel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix to try to get past main waterfall failure. Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/save_package.h" 5 #include "content/browser/download/save_package.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 BrowserThread::FILE, FROM_HERE, 619 BrowserThread::FILE, FROM_HERE,
620 NewRunnableMethod(file_manager_, 620 NewRunnableMethod(file_manager_,
621 &SaveFileManager::RemoveSavedFileFromFileMap, 621 &SaveFileManager::RemoveSavedFileFromFileMap,
622 save_ids)); 622 save_ids));
623 623
624 finished_ = true; 624 finished_ = true;
625 wait_state_ = FAILED; 625 wait_state_ = FAILED;
626 626
627 // Inform the DownloadItem we have canceled whole save page job. 627 // Inform the DownloadItem we have canceled whole save page job.
628 if (download_) { 628 if (download_) {
629 download_->Cancel(false); 629 download_->Cancel();
630 FinalizeDownloadEntry(); 630 FinalizeDownloadEntry();
631 } 631 }
632 } 632 }
633 633
634 void SavePackage::CheckFinish() { 634 void SavePackage::CheckFinish() {
635 if (in_process_count() || finished_) 635 if (in_process_count() || finished_)
636 return; 636 return;
637 637
638 FilePath dir = (save_type_ == SAVE_AS_COMPLETE_HTML && 638 FilePath dir = (save_type_ == SAVE_AS_COMPLETE_HTML &&
639 saved_success_items_.size() > 1) ? 639 saved_success_items_.size() > 1) ?
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 StopObservation(); 1280 StopObservation();
1281 } 1281 }
1282 1282
1283 void SavePackage::FinalizeDownloadEntry() { 1283 void SavePackage::FinalizeDownloadEntry() {
1284 DCHECK(download_); 1284 DCHECK(download_);
1285 DCHECK(download_manager_); 1285 DCHECK(download_manager_);
1286 1286
1287 download_manager_->SavePageDownloadFinished(download_); 1287 download_manager_->SavePageDownloadFinished(download_);
1288 StopObservation(); 1288 StopObservation();
1289 } 1289 }
OLDNEW
« no previous file with comments | « content/browser/download/mock_download_manager_delegate.cc ('k') | content/browser/net/url_request_slow_download_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698