Index: chrome/browser/download/download_ui_controller_unittest.cc |
diff --git a/chrome/browser/download/download_ui_controller_unittest.cc b/chrome/browser/download/download_ui_controller_unittest.cc |
index 84f7138bebbf00eb123b0b0e316b7f2fed2f1e9e..47308a7280e27a3ceaba20383ca9b5b17e0e3db5 100644 |
--- a/chrome/browser/download/download_ui_controller_unittest.cc |
+++ b/chrome/browser/download/download_ui_controller_unittest.cc |
@@ -14,9 +14,9 @@ |
#include "base/memory/ref_counted.h" |
#include "base/memory/weak_ptr.h" |
#include "base/observer_list.h" |
+#include "chrome/browser/download/download_core_service_factory.h" |
+#include "chrome/browser/download/download_core_service_impl.h" |
#include "chrome/browser/download/download_history.h" |
-#include "chrome/browser/download/download_service_factory.h" |
-#include "chrome/browser/download/download_service_impl.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/test/base/chrome_render_view_host_test_harness.h" |
#include "components/history/core/browser/download_row.h" |
@@ -61,11 +61,11 @@ void TestDelegate::OnNewDownloadReady(content::DownloadItem* item) { |
*receiver_ = item; |
} |
-// A DownloadService that returns a custom DownloadHistory. |
-class TestDownloadService : public DownloadServiceImpl { |
+// A DownloadCoreService that returns a custom DownloadHistory. |
+class TestDownloadCoreService : public DownloadCoreServiceImpl { |
public: |
- explicit TestDownloadService(Profile* profile); |
- ~TestDownloadService() override; |
+ explicit TestDownloadCoreService(Profile* profile); |
+ ~TestDownloadCoreService() override; |
void set_download_history(std::unique_ptr<DownloadHistory> download_history) { |
download_history_.swap(download_history); |
@@ -76,14 +76,12 @@ class TestDownloadService : public DownloadServiceImpl { |
std::unique_ptr<DownloadHistory> download_history_; |
}; |
-TestDownloadService::TestDownloadService(Profile* profile) |
- : DownloadServiceImpl(profile) { |
-} |
+TestDownloadCoreService::TestDownloadCoreService(Profile* profile) |
+ : DownloadCoreServiceImpl(profile) {} |
-TestDownloadService::~TestDownloadService() { |
-} |
+TestDownloadCoreService::~TestDownloadCoreService() {} |
-DownloadHistory* TestDownloadService::GetDownloadHistory() { |
+DownloadHistory* TestDownloadCoreService::GetDownloadHistory() { |
return download_history_.get(); |
} |
@@ -140,8 +138,8 @@ class DownloadUIControllerTest : public ChromeRenderViewHostTestHarness { |
} |
}; |
- // Constructs and returns a TestDownloadService. |
- static std::unique_ptr<KeyedService> TestingDownloadServiceFactory( |
+ // Constructs and returns a TestDownloadCoreService. |
+ static std::unique_ptr<KeyedService> TestingDownloadCoreServiceFactory( |
content::BrowserContext* browser_context); |
std::unique_ptr<MockDownloadManager> manager_; |
@@ -155,9 +153,9 @@ class DownloadUIControllerTest : public ChromeRenderViewHostTestHarness { |
// static |
std::unique_ptr<KeyedService> |
-DownloadUIControllerTest::TestingDownloadServiceFactory( |
+DownloadUIControllerTest::TestingDownloadCoreServiceFactory( |
content::BrowserContext* browser_context) { |
- return base::MakeUnique<TestDownloadService>( |
+ return base::MakeUnique<TestDownloadCoreService>( |
Profile::FromBrowserContext(browser_context)); |
} |
@@ -195,11 +193,12 @@ void DownloadUIControllerTest::SetUp() { |
.WillOnce(testing::Assign( |
&manager_observer_, |
static_cast<content::DownloadManager::Observer*>(NULL))); |
- TestDownloadService* download_service = static_cast<TestDownloadService*>( |
- DownloadServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
- browser_context(), &TestingDownloadServiceFactory)); |
- ASSERT_TRUE(download_service); |
- download_service->set_download_history(std::move(download_history)); |
+ TestDownloadCoreService* download_core_service = |
+ static_cast<TestDownloadCoreService*>( |
+ DownloadCoreServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
+ browser_context(), &TestingDownloadCoreServiceFactory)); |
+ ASSERT_TRUE(download_core_service); |
+ download_core_service->set_download_history(std::move(download_history)); |
} |
std::unique_ptr<MockDownloadItem> |