diff options
Diffstat (limited to 'content/browser/download')
19 files changed, 33 insertions, 31 deletions
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc index 9683b50..25c2434 100644 --- a/content/browser/download/base_file.cc +++ b/content/browser/download/base_file.cc @@ -10,8 +10,8 @@ #include "base/stringprintf.h" #include "base/threading/thread_restrictions.h" #include "base/utf_string_conversions.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/download_stats.h" +#include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" #include "crypto/secure_hash.h" #include "net/base/file_stream.h" diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc index c55696c..ee518c3 100644 --- a/content/browser/download/base_file_unittest.cc +++ b/content/browser/download/base_file_unittest.cc @@ -10,7 +10,7 @@ #include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/test/test_file_util.h" -#include "content/browser/browser_thread.h" +#include "content/test/test_browser_thread.h" #include "net/base/file_stream.h" #include "net/base/mock_file_stream.h" #include "net/base/net_errors.h" @@ -162,7 +162,7 @@ class BaseFileTest : public testing::Test { // Mock file thread to satisfy debug checks in BaseFile. MessageLoop message_loop_; - BrowserThread file_thread_; + content::TestBrowserThread file_thread_; }; // Test the most basic scenario: just create the object and do a sanity check diff --git a/content/browser/download/download_file.cc b/content/browser/download/download_file.cc index 147c7fe..a2bfb34 100644 --- a/content/browser/download/download_file.cc +++ b/content/browser/download/download_file.cc @@ -8,9 +8,9 @@ #include "base/file_util.h" #include "base/stringprintf.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/download_create_info.h" #include "content/browser/download/download_manager.h" +#include "content/public/browser/browser_thread.h" namespace { diff --git a/content/browser/download/download_file_manager.cc b/content/browser/download/download_file_manager.cc index e6ecc9f..b9d9362 100644 --- a/content/browser/download/download_file_manager.cc +++ b/content/browser/download/download_file_manager.cc @@ -9,7 +9,6 @@ #include "base/stl_util.h" #include "base/task.h" #include "base/utf_string_conversions.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/download_buffer.h" #include "content/browser/download/download_create_info.h" #include "content/browser/download/download_file.h" @@ -17,6 +16,7 @@ #include "content/browser/download/download_request_handle.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/tab_contents/tab_contents.h" +#include "content/public/browser/browser_thread.h" #include "content/public/browser/download_manager_delegate.h" #include "googleurl/src/gurl.h" #include "net/base/io_buffer.h" diff --git a/content/browser/download/download_file_unittest.cc b/content/browser/download/download_file_unittest.cc index 7851d34..44fb740 100644 --- a/content/browser/download/download_file_unittest.cc +++ b/content/browser/download/download_file_unittest.cc @@ -5,7 +5,6 @@ #include "base/file_util.h" #include "base/message_loop.h" #include "base/string_number_conversions.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/download_create_info.h" #include "content/browser/download/download_file.h" #include "content/browser/download/download_manager.h" @@ -13,6 +12,7 @@ #include "content/browser/download/download_status_updater.h" #include "content/browser/download/mock_download_manager.h" #include "content/browser/download/mock_download_manager_delegate.h" +#include "content/test/test_browser_thread.h" #include "net/base/file_stream.h" #include "net/base/net_errors.h" #include "testing/gtest/include/gtest/gtest.h" @@ -105,9 +105,9 @@ class DownloadFileTest : public testing::Test { private: MessageLoop loop_; // UI thread. - BrowserThread ui_thread_; + content::TestBrowserThread ui_thread_; // File thread to satisfy debug checks in DownloadFile. - BrowserThread file_thread_; + content::TestBrowserThread file_thread_; // Keep track of what data should be saved to the disk file. std::string expected_data_; diff --git a/content/browser/download/download_id_unittest.cc b/content/browser/download/download_id_unittest.cc index 39d9f3b..2e09525 100644 --- a/content/browser/download/download_id_unittest.cc +++ b/content/browser/download/download_id_unittest.cc @@ -9,8 +9,9 @@ #include <set> #include <vector> -#include "content/browser/download/mock_download_manager_delegate.h" #include "content/browser/download/mock_download_manager.h" +#include "content/browser/download/mock_download_manager_delegate.h" +#include "content/test/test_browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" class DownloadIdTest : public testing::Test { @@ -45,7 +46,8 @@ class DownloadIdTest : public testing::Test { scoped_ptr<MockDownloadManagerDelegate> download_manager_delegate_; scoped_refptr<DownloadManager> download_managers_[2]; MessageLoopForUI message_loop_; - BrowserThread ui_thread_; // Necessary to delete |DownloadManager|s. + // Necessary to delete |DownloadManager|s. + content::TestBrowserThread ui_thread_; size_t num_managers_; DISALLOW_COPY_AND_ASSIGN(DownloadIdTest); diff --git a/content/browser/download/download_item.cc b/content/browser/download/download_item.cc index 84387b6..d684930 100644 --- a/content/browser/download/download_item.cc +++ b/content/browser/download/download_item.cc @@ -14,10 +14,8 @@ #include "base/stringprintf.h" #include "base/timer.h" #include "base/utf_string_conversions.h" -#include "net/base/net_util.h" -#include "content/browser/browser_thread.h" -#include "content/browser/download/download_file.h" #include "content/browser/download/download_create_info.h" +#include "content/browser/download/download_file.h" #include "content/browser/download/download_file_manager.h" #include "content/browser/download/download_id.h" #include "content/browser/download/download_manager.h" @@ -25,8 +23,10 @@ #include "content/browser/download/download_request_handle.h" #include "content/browser/download/download_stats.h" #include "content/browser/download/interrupt_reasons.h" +#include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/download_manager_delegate.h" +#include "net/base/net_util.h" // A DownloadItem normally goes through the following states: // * Created (when download starts) diff --git a/content/browser/download/download_manager.cc b/content/browser/download/download_manager.cc index 890c9bc..37054dc 100644 --- a/content/browser/download/download_manager.cc +++ b/content/browser/download/download_manager.cc @@ -18,7 +18,6 @@ #include "base/task.h" #include "build/build_config.h" #include "content/browser/browser_context.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/download_create_info.h" #include "content/browser/download/download_file_manager.h" #include "content/browser/download/download_item.h" @@ -30,6 +29,7 @@ #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/tab_contents/tab_contents.h" +#include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/download_manager_delegate.h" #include "content/public/browser/notification_service.h" diff --git a/content/browser/download/download_manager.h b/content/browser/download/download_manager.h index d727798..9255058 100644 --- a/content/browser/download/download_manager.h +++ b/content/browser/download/download_manager.h @@ -44,11 +44,11 @@ #include "base/observer_list.h" #include "base/synchronization/lock.h" #include "base/time.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/download_item.h" #include "content/browser/download/download_status_updater_delegate.h" #include "content/browser/download/interrupt_reasons.h" #include "content/common/content_export.h" +#include "content/public/browser/browser_thread.h" #include "net/base/net_errors.h" class DownloadFileManager; diff --git a/content/browser/download/download_request_handle.cc b/content/browser/download/download_request_handle.cc index de6d5aa..6b38e30 100644 --- a/content/browser/download/download_request_handle.cc +++ b/content/browser/download/download_request_handle.cc @@ -6,10 +6,10 @@ #include "base/stringprintf.h" #include "content/browser/browser_context.h" -#include "content/browser/browser_thread.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/tab_contents/tab_contents.h" +#include "content/public/browser/browser_thread.h" // IO Thread indirections to resource dispatcher host. // Provided as targets for PostTask from within this object diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc index d7b5211..7450450 100644 --- a/content/browser/download/download_resource_handler.cc +++ b/content/browser/download/download_resource_handler.cc @@ -10,7 +10,6 @@ #include "base/metrics/histogram.h" #include "base/metrics/stats_counters.h" #include "base/stringprintf.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/download_buffer.h" #include "content/browser/download/download_create_info.h" #include "content/browser/download/download_file_manager.h" @@ -23,6 +22,7 @@ #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" #include "content/common/resource_response.h" +#include "content/public/browser/browser_thread.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/http/http_response_headers.h" diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc index 69ce7a1..2b578c7 100644 --- a/content/browser/download/drag_download_file.cc +++ b/content/browser/download/drag_download_file.cc @@ -7,10 +7,10 @@ #include "base/file_util.h" #include "base/message_loop.h" #include "content/browser/browser_context.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/download_item.h" #include "content/browser/download/download_stats.h" #include "content/browser/tab_contents/tab_contents.h" +#include "content/public/browser/browser_thread.h" #include "net/base/file_stream.h" DragDownloadFile::DragDownloadFile( diff --git a/content/browser/download/drag_download_util.cc b/content/browser/download/drag_download_util.cc index 99d185a..1483d06 100644 --- a/content/browser/download/drag_download_util.cc +++ b/content/browser/download/drag_download_util.cc @@ -4,14 +4,14 @@ #include "content/browser/download/drag_download_util.h" -#include "base/string_util.h" #include "base/file_path.h" #include "base/file_util.h" #include "base/memory/scoped_ptr.h" -#include "base/task.h" #include "base/string_number_conversions.h" +#include "base/string_util.h" +#include "base/task.h" #include "base/utf_string_conversions.h" -#include "content/browser/browser_thread.h" +#include "content/public/browser/browser_thread.h" #include "googleurl/src/gurl.h" #include "net/base/file_stream.h" #include "net/base/net_errors.h" diff --git a/content/browser/download/mhtml_generation_manager.h b/content/browser/download/mhtml_generation_manager.h index 47c847e..704e2ee 100644 --- a/content/browser/download/mhtml_generation_manager.h +++ b/content/browser/download/mhtml_generation_manager.h @@ -10,8 +10,8 @@ #include "base/memory/ref_counted.h" #include "base/platform_file.h" #include "base/process.h" -#include "content/browser/browser_thread.h" #include "content/common/content_export.h" +#include "content/public/browser/browser_thread.h" #include "ipc/ipc_platform_file.h" class FilePath; diff --git a/content/browser/download/save_file.cc b/content/browser/download/save_file.cc index 40c6c35..c03abc7 100644 --- a/content/browser/download/save_file.cc +++ b/content/browser/download/save_file.cc @@ -1,11 +1,11 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/download/save_file.h" #include "base/logging.h" -#include "content/browser/browser_thread.h" +#include "content/public/browser/browser_thread.h" #include "net/base/file_stream.h" SaveFile::SaveFile(const SaveFileCreateInfo* info) diff --git a/content/browser/download/save_file_manager.cc b/content/browser/download/save_file_manager.cc index 88dc90e..26e7664 100644 --- a/content/browser/download/save_file_manager.cc +++ b/content/browser/download/save_file_manager.cc @@ -12,15 +12,15 @@ #include "base/stl_util.h" #include "base/string_util.h" #include "base/threading/thread.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/save_file.h" #include "content/browser/download/save_package.h" -#include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/tab_contents/tab_contents.h" +#include "content/public/browser/browser_thread.h" #include "googleurl/src/gurl.h" -#include "net/base/net_util.h" #include "net/base/io_buffer.h" +#include "net/base/net_util.h" SaveFileManager::SaveFileManager(ResourceDispatcherHost* rdh) : next_id_(0), diff --git a/content/browser/download/save_file_resource_handler.cc b/content/browser/download/save_file_resource_handler.cc index 4830c1d..67de144 100644 --- a/content/browser/download/save_file_resource_handler.cc +++ b/content/browser/download/save_file_resource_handler.cc @@ -8,8 +8,8 @@ #include "base/logging.h" #include "base/message_loop.h" #include "base/string_number_conversions.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/save_file_manager.h" +#include "content/public/browser/browser_thread.h" #include "net/base/io_buffer.h" #include "net/url_request/url_request_status.h" diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc index be2c051..f510219 100644 --- a/content/browser/download/save_package.cc +++ b/content/browser/download/save_package.cc @@ -19,7 +19,6 @@ #include "base/threading/thread.h" #include "base/utf_string_conversions.h" #include "content/browser/browser_context.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/download_file_manager.h" #include "content/browser/download/download_item.h" #include "content/browser/download/download_manager.h" @@ -32,6 +31,7 @@ #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/common/view_messages.h" +#include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/download_manager_delegate.h" #include "content/public/common/url_constants.h" diff --git a/content/browser/download/save_package_unittest.cc b/content/browser/download/save_package_unittest.cc index 23b62da..d8750e7 100644 --- a/content/browser/download/save_package_unittest.cc +++ b/content/browser/download/save_package_unittest.cc @@ -9,11 +9,11 @@ #include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "content/browser/browser_thread.h" #include "content/browser/download/save_package.h" #include "content/browser/net/url_request_mock_http_job.h" #include "content/browser/renderer_host/test_render_view_host.h" #include "content/browser/tab_contents/test_tab_contents.h" +#include "content/test/test_browser_thread.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" @@ -119,7 +119,7 @@ class SavePackageTest : public RenderViewHostTestHarness { } private: - BrowserThread browser_thread_; + content::TestBrowserThread browser_thread_; // SavePackage for successfully generating file name. scoped_refptr<SavePackage> save_package_success_; |