| OLD | NEW |
| 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 #include "content/browser/download/download_file_manager.h" | 5 #include "content/browser/download/download_file_manager.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
| 11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
| 12 #include "content/browser/browser_thread_impl.h" | 12 #include "content/browser/browser_thread_impl.h" |
| 13 #include "content/browser/download/download_buffer.h" | 13 #include "content/browser/download/download_buffer.h" |
| 14 #include "content/browser/download/download_create_info.h" | 14 #include "content/browser/download/download_create_info.h" |
| 15 #include "content/browser/download/download_interrupt_reasons_impl.h" | 15 #include "content/browser/download/download_interrupt_reasons_impl.h" |
| 16 #include "content/browser/download/download_request_handle.h" | 16 #include "content/browser/download/download_request_handle.h" |
| 17 #include "content/browser/download/mock_download_file.h" | 17 #include "content/browser/download/mock_download_file.h" |
| 18 #include "content/public/browser/download_id.h" | 18 #include "content/public/browser/download_id.h" |
| 19 #include "content/test/mock_download_manager.h" | 19 #include "content/public/test/mock_download_manager.h" |
| 20 #include "net/base/io_buffer.h" | 20 #include "net/base/io_buffer.h" |
| 21 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
| 22 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
| 23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 | 24 |
| 25 using content::BrowserThread; | 25 using content::BrowserThread; |
| 26 using content::BrowserThreadImpl; | 26 using content::BrowserThreadImpl; |
| 27 using content::DownloadId; | 27 using content::DownloadId; |
| 28 using content::MockDownloadManager; | 28 using content::MockDownloadManager; |
| 29 | 29 |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 // DownloadFile::GetDownloadFile | 744 // DownloadFile::GetDownloadFile |
| 745 // Process one message in the message loop | 745 // Process one message in the message loop |
| 746 // DownloadManager::UpdateDownload | 746 // DownloadManager::UpdateDownload |
| 747 | 747 |
| 748 // TODO(ahendrickson) -- A test for download manager shutdown. | 748 // TODO(ahendrickson) -- A test for download manager shutdown. |
| 749 // Expected call sequence: | 749 // Expected call sequence: |
| 750 // OnDownloadManagerShutdown | 750 // OnDownloadManagerShutdown |
| 751 // DownloadFile::GetDownloadManager | 751 // DownloadFile::GetDownloadManager |
| 752 // DownloadFile::CancelDownloadRequest | 752 // DownloadFile::CancelDownloadRequest |
| 753 // DownloadFile::~DownloadFile | 753 // DownloadFile::~DownloadFile |
| OLD | NEW |