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

Unified Diff: storage/browser/blob/blob_reader.cc

Issue 1546243002: Convert Pass()→std::move() in //storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « storage/browser/blob/blob_data_item.cc ('k') | storage/browser/blob/blob_storage_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_reader.cc
diff --git a/storage/browser/blob/blob_reader.cc b/storage/browser/blob/blob_reader.cc
index 8a38bfeb91b3596ea5d6780b9116df0663e1f5fc..6e3e866ba752c014778230b708f0eb8ed3d54342 100644
--- a/storage/browser/blob/blob_reader.cc
+++ b/storage/browser/blob/blob_reader.cc
@@ -6,9 +6,9 @@
#include <stddef.h>
#include <stdint.h>
-
#include <algorithm>
#include <limits>
+#include <utility>
#include "base/bind.h"
#include "base/sequenced_task_runner.h"
@@ -44,12 +44,12 @@ BlobReader::BlobReader(
const BlobDataHandle* blob_handle,
scoped_ptr<FileStreamReaderProvider> file_stream_provider,
base::SequencedTaskRunner* file_task_runner)
- : file_stream_provider_(file_stream_provider.Pass()),
+ : file_stream_provider_(std::move(file_stream_provider)),
file_task_runner_(file_task_runner),
net_error_(net::OK),
weak_factory_(this) {
if (blob_handle) {
- blob_data_ = blob_handle->CreateSnapshot().Pass();
+ blob_data_ = blob_handle->CreateSnapshot();
}
}
@@ -527,19 +527,15 @@ scoped_ptr<FileStreamReader> BlobReader::CreateFileStreamReader(
switch (item.type()) {
case DataElement::TYPE_FILE:
return file_stream_provider_->CreateForLocalFile(
- file_task_runner_.get(), item.path(),
- item.offset() + additional_offset,
- item.expected_modification_time())
- .Pass();
+ file_task_runner_.get(), item.path(),
+ item.offset() + additional_offset, item.expected_modification_time());
case DataElement::TYPE_FILE_FILESYSTEM:
- return file_stream_provider_
- ->CreateFileStreamReader(
- item.filesystem_url(), item.offset() + additional_offset,
- item.length() == std::numeric_limits<uint64_t>::max()
- ? storage::kMaximumLength
- : item.length() - additional_offset,
- item.expected_modification_time())
- .Pass();
+ return file_stream_provider_->CreateFileStreamReader(
+ item.filesystem_url(), item.offset() + additional_offset,
+ item.length() == std::numeric_limits<uint64_t>::max()
+ ? storage::kMaximumLength
+ : item.length() - additional_offset,
+ item.expected_modification_time());
case DataElement::TYPE_BLOB:
case DataElement::TYPE_BYTES:
case DataElement::TYPE_BYTES_DESCRIPTION:
« no previous file with comments | « storage/browser/blob/blob_data_item.cc ('k') | storage/browser/blob/blob_storage_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698