Index: components/drive/drive_uploader.cc |
diff --git a/components/drive/drive_uploader.cc b/components/drive/drive_uploader.cc |
index e8b0c53da6d82bdd6cb71dfe2c7c51da87d5a5d5..ed2a92193ebc55cf2e34562f36cb502925c3e68c 100644 |
--- a/components/drive/drive_uploader.cc |
+++ b/components/drive/drive_uploader.cc |
@@ -15,7 +15,8 @@ |
#include "base/strings/string_number_conversions.h" |
#include "base/task_runner_util.h" |
#include "components/drive/service/drive_service_interface.h" |
-#include "content/public/browser/power_save_blocker_factory.h" |
+#include "content/public/browser/browser_thread.h" |
+#include "device/power_save_blocker/power_save_blocker.h" |
#include "google_apis/drive/drive_api_parser.h" |
using google_apis::CancelCallback; |
@@ -98,10 +99,14 @@ struct DriveUploader::UploadFileInfo { |
progress_callback(progress_callback), |
content_length(0), |
next_start_position(-1), |
- power_save_blocker(content::CreatePowerSaveBlocker( |
- content::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, |
- content::PowerSaveBlocker::kReasonOther, |
- "Upload in progress")), |
+ power_save_blocker(device::PowerSaveBlocker::CreateWithTaskRunners( |
+ device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, |
+ device::PowerSaveBlocker::kReasonOther, |
+ "Upload in progress", |
+ content::BrowserThread::GetMessageLoopProxyForThread( |
+ content::BrowserThread::UI), |
+ content::BrowserThread::GetMessageLoopProxyForThread( |
+ content::BrowserThread::FILE))), |
cancelled(false), |
weak_ptr_factory_(this) {} |
@@ -143,7 +148,7 @@ struct DriveUploader::UploadFileInfo { |
int64_t next_start_position; |
// Blocks system suspend while upload is in progress. |
- std::unique_ptr<content::PowerSaveBlocker> power_save_blocker; |
+ std::unique_ptr<device::PowerSaveBlocker> power_save_blocker; |
// Fields for implementing cancellation. |cancel_callback| is non-null if |
// there is an in-flight HTTP request. In that case, |cancell_callback| will |