OLD | NEW |
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 "chrome/browser/download/save_package.h" | 5 #include "chrome/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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 BrowserThread::PostTask( | 683 BrowserThread::PostTask( |
684 BrowserThread::FILE, FROM_HERE, | 684 BrowserThread::FILE, FROM_HERE, |
685 NewRunnableMethod(file_manager_, | 685 NewRunnableMethod(file_manager_, |
686 &SaveFileManager::RemoveSavedFileFromFileMap, | 686 &SaveFileManager::RemoveSavedFileFromFileMap, |
687 save_ids)); | 687 save_ids)); |
688 | 688 |
689 finished_ = true; | 689 finished_ = true; |
690 wait_state_ = FAILED; | 690 wait_state_ = FAILED; |
691 | 691 |
692 // Inform the DownloadItem we have canceled whole save page job. | 692 // Inform the DownloadItem we have canceled whole save page job. |
693 download_->Cancel(false); | 693 download_->Cancel(); |
694 } | 694 } |
695 | 695 |
696 void SavePackage::CheckFinish() { | 696 void SavePackage::CheckFinish() { |
697 if (in_process_count() || finished_) | 697 if (in_process_count() || finished_) |
698 return; | 698 return; |
699 | 699 |
700 FilePath dir = (save_type_ == SAVE_AS_COMPLETE_HTML && | 700 FilePath dir = (save_type_ == SAVE_AS_COMPLETE_HTML && |
701 saved_success_items_.size() > 1) ? | 701 saved_success_items_.size() > 1) ? |
702 saved_main_directory_path_ : FilePath(); | 702 saved_main_directory_path_ : FilePath(); |
703 | 703 |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1466 } | 1466 } |
1467 | 1467 |
1468 // SelectFileDialog::Listener interface. | 1468 // SelectFileDialog::Listener interface. |
1469 void SavePackage::FileSelected(const FilePath& path, | 1469 void SavePackage::FileSelected(const FilePath& path, |
1470 int index, void* params) { | 1470 int index, void* params) { |
1471 ContinueSave(path, index); | 1471 ContinueSave(path, index); |
1472 } | 1472 } |
1473 | 1473 |
1474 void SavePackage::FileSelectionCanceled(void* params) { | 1474 void SavePackage::FileSelectionCanceled(void* params) { |
1475 } | 1475 } |
OLD | NEW |