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

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

Issue 2889533002: Remove unnecessary powersaveblocker in download_browsertests.cc (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_browsertest.cc
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index 20dfc1c9c864ee4ef23ff98c5bd6510bf994d150..a5debca6eb78ded232043440838a902ceb2a311b 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -57,7 +57,6 @@
#include "content/shell/browser/shell_download_manager_delegate.h"
#include "content/shell/browser/shell_network_delegate.h"
#include "content/test/content_browser_test_utils_internal.h"
-#include "device/power_save_blocker/power_save_blocker.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
@@ -149,7 +148,6 @@ class DownloadFileWithDelay : public DownloadFileImpl {
const base::FilePath& default_download_directory,
std::unique_ptr<ByteStreamReader> stream,
const net::NetLogWithSource& net_log,
- std::unique_ptr<device::PowerSaveBlocker> power_save_blocker,
base::WeakPtr<DownloadDestinationObserver> observer,
base::WeakPtr<DownloadFileWithDelayFactory> owner);
@@ -216,7 +214,6 @@ DownloadFileWithDelay::DownloadFileWithDelay(
const base::FilePath& default_download_directory,
std::unique_ptr<ByteStreamReader> stream,
const net::NetLogWithSource& net_log,
- std::unique_ptr<device::PowerSaveBlocker> power_save_blocker,
base::WeakPtr<DownloadDestinationObserver> observer,
base::WeakPtr<DownloadFileWithDelayFactory> owner)
: DownloadFileImpl(std::move(save_info),
@@ -277,16 +274,10 @@ DownloadFile* DownloadFileWithDelayFactory::CreateFile(
std::unique_ptr<ByteStreamReader> stream,
const net::NetLogWithSource& net_log,
base::WeakPtr<DownloadDestinationObserver> observer) {
- std::unique_ptr<device::PowerSaveBlocker> psb(new device::PowerSaveBlocker(
- device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
- device::PowerSaveBlocker::kReasonOther, "Download in progress",
- BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
- BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
return new DownloadFileWithDelay(std::move(save_info),
default_download_directory,
std::move(stream),
net_log,
- std::move(psb),
observer,
weak_ptr_factory_.GetWeakPtr());
}
@@ -321,7 +312,6 @@ class CountingDownloadFile : public DownloadFileImpl {
const base::FilePath& default_downloads_directory,
std::unique_ptr<ByteStreamReader> stream,
const net::NetLogWithSource& net_log,
- std::unique_ptr<device::PowerSaveBlocker> power_save_blocker,
base::WeakPtr<DownloadDestinationObserver> observer)
: DownloadFileImpl(std::move(save_info),
default_downloads_directory,
@@ -381,16 +371,10 @@ class CountingDownloadFileFactory : public DownloadFileFactory {
std::unique_ptr<ByteStreamReader> stream,
const net::NetLogWithSource& net_log,
base::WeakPtr<DownloadDestinationObserver> observer) override {
- std::unique_ptr<device::PowerSaveBlocker> psb(new device::PowerSaveBlocker(
- device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
- device::PowerSaveBlocker::kReasonOther, "Download in progress",
- BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
- BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
return new CountingDownloadFile(std::move(save_info),
default_downloads_directory,
std::move(stream),
net_log,
- std::move(psb),
observer);
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698