| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/download_file.h" | 5 #include "chrome/browser/download/download_file.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/scoped_ptr.h" | |
| 10 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 11 #include "base/task.h" | 10 #include "base/task.h" |
| 12 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 13 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/download/download_manager.h" | 13 #include "chrome/browser/download/download_manager.h" |
| 15 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profile.h" |
| 16 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 15 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
| 17 #include "chrome/browser/tab_contents/tab_util.h" | 16 #include "chrome/browser/tab_contents/tab_util.h" |
| 18 #include "chrome/browser/tab_contents/web_contents.h" | 17 #include "chrome/browser/tab_contents/web_contents.h" |
| 19 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 ui_loop_->PostTask(FROM_HERE, NewRunnableMethod( | 594 ui_loop_->PostTask(FROM_HERE, NewRunnableMethod( |
| 596 this, &DownloadFileManager::StopUpdateTimer)); | 595 this, &DownloadFileManager::StopUpdateTimer)); |
| 597 } | 596 } |
| 598 | 597 |
| 599 // static | 598 // static |
| 600 void DownloadFileManager::DeleteFile(const FilePath& path) { | 599 void DownloadFileManager::DeleteFile(const FilePath& path) { |
| 601 // Make sure we only delete files. | 600 // Make sure we only delete files. |
| 602 if (!file_util::DirectoryExists(path)) | 601 if (!file_util::DirectoryExists(path)) |
| 603 file_util::Delete(path, false); | 602 file_util::Delete(path, false); |
| 604 } | 603 } |
| OLD | NEW |