Index: content/browser/download/download_browsertest.cc |
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc |
index a32feb932e1275a408ac8454c21e0ed0b729dd34..06393fab1fbe179a97fecbd0f42210d3e75225b3 100644 |
--- a/content/browser/download/download_browsertest.cc |
+++ b/content/browser/download/download_browsertest.cc |
@@ -30,9 +30,9 @@ |
#include "content/browser/download/download_manager_impl.h" |
#include "content/browser/download/download_resource_handler.h" |
#include "content/browser/loader/resource_dispatcher_host_impl.h" |
+#include "content/browser/power_save_blocker_factory.h" |
#include "content/browser/web_contents/web_contents_impl.h" |
#include "content/public/browser/download_danger_type.h" |
-#include "content/public/browser/power_save_blocker_factory.h" |
#include "content/public/browser/resource_dispatcher_host_delegate.h" |
#include "content/public/browser/resource_throttle.h" |
#include "content/public/common/content_features.h" |
@@ -122,13 +122,14 @@ static DownloadManagerImpl* DownloadManagerForShell(Shell* shell) { |
class DownloadFileWithDelay : public DownloadFileImpl { |
public: |
- DownloadFileWithDelay(std::unique_ptr<DownloadSaveInfo> save_info, |
- const base::FilePath& default_download_directory, |
- std::unique_ptr<ByteStreamReader> stream, |
- const net::BoundNetLog& bound_net_log, |
- std::unique_ptr<PowerSaveBlocker> power_save_blocker, |
- base::WeakPtr<DownloadDestinationObserver> observer, |
- base::WeakPtr<DownloadFileWithDelayFactory> owner); |
+ DownloadFileWithDelay( |
+ std::unique_ptr<DownloadSaveInfo> save_info, |
+ const base::FilePath& default_download_directory, |
+ std::unique_ptr<ByteStreamReader> stream, |
+ const net::BoundNetLog& bound_net_log, |
+ std::unique_ptr<device::PowerSaveBlocker> power_save_blocker, |
+ base::WeakPtr<DownloadDestinationObserver> observer, |
+ base::WeakPtr<DownloadFileWithDelayFactory> owner); |
~DownloadFileWithDelay() override; |
@@ -193,7 +194,7 @@ DownloadFileWithDelay::DownloadFileWithDelay( |
const base::FilePath& default_download_directory, |
std::unique_ptr<ByteStreamReader> stream, |
const net::BoundNetLog& bound_net_log, |
- std::unique_ptr<PowerSaveBlocker> power_save_blocker, |
+ std::unique_ptr<device::PowerSaveBlocker> power_save_blocker, |
base::WeakPtr<DownloadDestinationObserver> observer, |
base::WeakPtr<DownloadFileWithDelayFactory> owner) |
: DownloadFileImpl(std::move(save_info), |
@@ -254,9 +255,9 @@ DownloadFile* DownloadFileWithDelayFactory::CreateFile( |
std::unique_ptr<ByteStreamReader> stream, |
const net::BoundNetLog& bound_net_log, |
base::WeakPtr<DownloadDestinationObserver> observer) { |
- std::unique_ptr<PowerSaveBlocker> psb(CreatePowerSaveBlocker( |
- PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, |
- PowerSaveBlocker::kReasonOther, "Download in progress")); |
+ std::unique_ptr<device::PowerSaveBlocker> psb(CreatePowerSaveBlocker( |
+ device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, |
+ device::PowerSaveBlocker::kReasonOther, "Download in progress")); |
return new DownloadFileWithDelay(std::move(save_info), |
default_download_directory, |
std::move(stream), |
@@ -291,12 +292,13 @@ void DownloadFileWithDelayFactory::WaitForSomeCallback() { |
class CountingDownloadFile : public DownloadFileImpl { |
public: |
- CountingDownloadFile(std::unique_ptr<DownloadSaveInfo> save_info, |
- const base::FilePath& default_downloads_directory, |
- std::unique_ptr<ByteStreamReader> stream, |
- const net::BoundNetLog& bound_net_log, |
- std::unique_ptr<PowerSaveBlocker> power_save_blocker, |
- base::WeakPtr<DownloadDestinationObserver> observer) |
+ CountingDownloadFile( |
+ std::unique_ptr<DownloadSaveInfo> save_info, |
+ const base::FilePath& default_downloads_directory, |
+ std::unique_ptr<ByteStreamReader> stream, |
+ const net::BoundNetLog& bound_net_log, |
+ std::unique_ptr<device::PowerSaveBlocker> power_save_blocker, |
+ base::WeakPtr<DownloadDestinationObserver> observer) |
: DownloadFileImpl(std::move(save_info), |
default_downloads_directory, |
std::move(stream), |
@@ -350,9 +352,9 @@ class CountingDownloadFileFactory : public DownloadFileFactory { |
std::unique_ptr<ByteStreamReader> stream, |
const net::BoundNetLog& bound_net_log, |
base::WeakPtr<DownloadDestinationObserver> observer) override { |
- std::unique_ptr<PowerSaveBlocker> psb(CreatePowerSaveBlocker( |
- PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, |
- PowerSaveBlocker::kReasonOther, "Download in progress")); |
+ std::unique_ptr<device::PowerSaveBlocker> psb(CreatePowerSaveBlocker( |
+ device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, |
+ device::PowerSaveBlocker::kReasonOther, "Download in progress")); |
return new CountingDownloadFile(std::move(save_info), |
default_downloads_directory, |
std::move(stream), |