Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(885)

Unified Diff: content/browser/download/download_browsertest.cc

Issue 2073353002: Merge PowerSaveBlockerImpl and PowerSaveBlocker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-power-factory
Patch Set: android Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_browsertest.cc
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index 7589503c6f3510f841b71253ff04f9b56685a374..352f7a22b1bab423dd5bbf0a766025a6f4629aa0 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -255,12 +255,11 @@ DownloadFile* DownloadFileWithDelayFactory::CreateFile(
std::unique_ptr<ByteStreamReader> stream,
const net::BoundNetLog& bound_net_log,
base::WeakPtr<DownloadDestinationObserver> observer) {
- std::unique_ptr<device::PowerSaveBlocker> psb(
- device::PowerSaveBlocker::CreateWithTaskRunners(
- device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
- device::PowerSaveBlocker::kReasonOther, "Download in progress",
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
+ std::unique_ptr<device::PowerSaveBlocker> psb(new device::PowerSaveBlocker(
+ device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
+ device::PowerSaveBlocker::kReasonOther, "Download in progress",
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
return new DownloadFileWithDelay(std::move(save_info),
default_download_directory,
std::move(stream),
@@ -355,12 +354,11 @@ class CountingDownloadFileFactory : public DownloadFileFactory {
std::unique_ptr<ByteStreamReader> stream,
const net::BoundNetLog& bound_net_log,
base::WeakPtr<DownloadDestinationObserver> observer) override {
- std::unique_ptr<device::PowerSaveBlocker> psb(
- device::PowerSaveBlocker::CreateWithTaskRunners(
- device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
- device::PowerSaveBlocker::kReasonOther, "Download in progress",
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
+ std::unique_ptr<device::PowerSaveBlocker> psb(new device::PowerSaveBlocker(
+ device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
+ device::PowerSaveBlocker::kReasonOther, "Download in progress",
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
return new CountingDownloadFile(std::move(save_info),
default_downloads_directory,
std::move(stream),
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.cc ('k') | content/browser/download/download_request_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698