| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/download/save_file_manager.h" | 7 #include "chrome/browser/download/save_file_manager.h" |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/stl_util-inl.h" |
| 11 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 12 #include "base/task.h" | 13 #include "base/task.h" |
| 13 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/download/save_file.h" | 15 #include "chrome/browser/download/save_file.h" |
| 15 #include "chrome/browser/download/save_package.h" | 16 #include "chrome/browser/download/save_package.h" |
| 16 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 17 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
| 17 #include "chrome/browser/tab_contents/tab_contents.h" | 18 #include "chrome/browser/tab_contents/tab_contents.h" |
| 18 #include "chrome/browser/tab_contents/tab_util.h" | 19 #include "chrome/browser/tab_contents/tab_util.h" |
| 19 #include "chrome/common/chrome_paths.h" | 20 #include "chrome/common/chrome_paths.h" |
| 20 #include "chrome/common/platform_util.h" | 21 #include "chrome/common/platform_util.h" |
| 21 #include "chrome/common/stl_util-inl.h" | |
| 22 #include "googleurl/src/gurl.h" | 22 #include "googleurl/src/gurl.h" |
| 23 #include "net/base/net_util.h" | 23 #include "net/base/net_util.h" |
| 24 #include "net/base/io_buffer.h" | 24 #include "net/base/io_buffer.h" |
| 25 #include "net/url_request/url_request_context.h" | 25 #include "net/url_request/url_request_context.h" |
| 26 | 26 |
| 27 | 27 |
| 28 SaveFileManager::SaveFileManager(MessageLoop* ui_loop, | 28 SaveFileManager::SaveFileManager(MessageLoop* ui_loop, |
| 29 MessageLoop* io_loop, | 29 MessageLoop* io_loop, |
| 30 ResourceDispatcherHost* rdh) | 30 ResourceDispatcherHost* rdh) |
| 31 : next_id_(0), | 31 : next_id_(0), |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 SaveFileMap::iterator it = save_file_map_.find(*i); | 566 SaveFileMap::iterator it = save_file_map_.find(*i); |
| 567 if (it != save_file_map_.end()) { | 567 if (it != save_file_map_.end()) { |
| 568 SaveFile* save_file = it->second; | 568 SaveFile* save_file = it->second; |
| 569 DCHECK(!save_file->in_progress()); | 569 DCHECK(!save_file->in_progress()); |
| 570 file_util::Delete(save_file->full_path(), false); | 570 file_util::Delete(save_file->full_path(), false); |
| 571 delete save_file; | 571 delete save_file; |
| 572 save_file_map_.erase(it); | 572 save_file_map_.erase(it); |
| 573 } | 573 } |
| 574 } | 574 } |
| 575 } | 575 } |
| OLD | NEW |