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

Unified Diff: chrome/browser/chromeos/drive/download_handler.cc

Issue 2887933002: Remove usage of SequencedWorkerPool::GetNamedSequenceToken from ChromeDownloadManagerDelegate. (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
Index: chrome/browser/chromeos/drive/download_handler.cc
diff --git a/chrome/browser/chromeos/drive/download_handler.cc b/chrome/browser/chromeos/drive/download_handler.cc
index 468f503e9ad77f6fe78f48c8c83fdb5313f5232b..4be75caa06bc3d7e74b9400bbf62c2e285e43d15 100644
--- a/chrome/browser/chromeos/drive/download_handler.cc
+++ b/chrome/browser/chromeos/drive/download_handler.cc
@@ -6,6 +6,8 @@
#include <stddef.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/macros.h"
@@ -104,10 +106,10 @@ void MoveDownloadedFile(const base::FilePath& downloaded_file,
// Used to implement CheckForFileExistence().
void ContinueCheckingForFileExistence(
- const content::CheckForFileExistenceCallback& callback,
+ content::CheckForFileExistenceCallback callback,
FileError error,
std::unique_ptr<ResourceEntry> entry) {
- callback.Run(error == FILE_ERROR_OK);
+ std::move(callback).Run(error == FILE_ERROR_OK);
}
// Returns true if |download| is a Drive download created from data persisted
@@ -247,11 +249,11 @@ bool DownloadHandler::IsDriveDownload(const DownloadItem* download) {
void DownloadHandler::CheckForFileExistence(
const DownloadItem* download,
- const content::CheckForFileExistenceCallback& callback) {
+ content::CheckForFileExistenceCallback callback) {
file_system_->GetResourceEntry(
util::ExtractDrivePath(GetTargetPath(download)),
base::Bind(&ContinueCheckingForFileExistence,
- callback));
+ base::Passed(std::move(callback))));
}
void DownloadHandler::SetFreeDiskSpaceDelayForTesting(
« no previous file with comments | « chrome/browser/chromeos/drive/download_handler.h ('k') | chrome/browser/download/chrome_download_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698