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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2893873002: Convert PowerSaveBlockResourceThrottle to be client of WakeLock mojo service. (Closed)
Patch Set: Convert PowerSaveBlockResourceThrottle to be client of WakeLock mojo service. 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
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 674e0321d7ffd2b85860df12a309a51643044d2f..3fdda2620bbb87dacc2312e990c25efba61e7cfa 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -51,7 +51,6 @@
#include "content/browser/loader/navigation_resource_throttle.h"
#include "content/browser/loader/navigation_url_loader_impl_core.h"
#include "content/browser/loader/null_resource_controller.h"
-#include "content/browser/loader/power_save_block_resource_throttle.h"
#include "content/browser/loader/redirect_to_file_resource_handler.h"
#include "content/browser/loader/resource_loader.h"
#include "content/browser/loader/resource_message_filter.h"
@@ -62,6 +61,7 @@
#include "content/browser/loader/sync_resource_handler.h"
#include "content/browser/loader/throttling_resource_handler.h"
#include "content/browser/loader/upload_data_stream_builder.h"
+#include "content/browser/loader/wake_lock_resource_throttle.h"
#include "content/browser/resource_context_impl.h"
#include "content/browser/service_worker/foreign_fetch_request_handler.h"
#include "content/browser/service_worker/link_header_support.h"
@@ -1550,10 +1550,9 @@ ResourceDispatcherHostImpl::AddStandardHandlers(
}
if (request->has_upload()) {
- // Block power save while uploading data.
- throttles.push_back(base::MakeUnique<PowerSaveBlockResourceThrottle>(
- request->url().host(), main_thread_task_runner_,
- BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)));
+ // Request wake lock while uploading data.
+ throttles.push_back(
+ base::MakeUnique<WakeLockResourceThrottle>(request->url().host()));
}
// TODO(ricea): Stop looking this up so much.
« no previous file with comments | « content/browser/loader/power_save_block_resource_throttle.cc ('k') | content/browser/loader/wake_lock_resource_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698