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

Unified Diff: components/drive/drive_uploader.cc

Issue 2075153002: Reland of 'Move content/browser/power_save_blocker to //device/power_save_blocker' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing libs for component mac 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
« no previous file with comments | « components/drive/DEPS ('k') | content/app/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « components/drive/DEPS ('k') | content/app/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698