diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-01-25 11:39:07 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-01-25 15:20:42 +0000 |
commit | 6c91641271e536ffaa88a1dff5127e42ee99a91e (patch) | |
tree | 703d9dd49602377ddc90cbf886aad37913f2496b /chromium/storage/browser/blob/blob_reader.cc | |
parent | b145b7fafd36f0c260d6a768c81fc14e32578099 (diff) | |
download | qtwebengine-chromium-6c91641271e536ffaa88a1dff5127e42ee99a91e.tar.gz |
BASELINE: Update Chromium to 49.0.2623.23
Also adds missing printing sources.
Change-Id: I3726b8f0c7d6751c9fc846096c571fadca7108cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/storage/browser/blob/blob_reader.cc')
-rw-r--r-- | chromium/storage/browser/blob/blob_reader.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/chromium/storage/browser/blob/blob_reader.cc b/chromium/storage/browser/blob/blob_reader.cc index ccb4e55a0cd..6e3e866ba75 100644 --- a/chromium/storage/browser/blob/blob_reader.cc +++ b/chromium/storage/browser/blob/blob_reader.cc @@ -4,8 +4,11 @@ #include "storage/browser/blob/blob_reader.h" +#include <stddef.h> +#include <stdint.h> #include <algorithm> #include <limits> +#include <utility> #include "base/bind.h" #include "base/sequenced_task_runner.h" @@ -41,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(); } } @@ -240,11 +243,11 @@ bool BlobReader::ResolveFileItemLength(const BlobDataItem& item, return false; } - uint64 max_length = file_length - item_offset; + uint64_t max_length = file_length - item_offset; // If item length is undefined, then we need to use the file size being // resolved in the real time. - if (item_length == std::numeric_limits<uint64>::max()) { + if (item_length == std::numeric_limits<uint64_t>::max()) { item_length = max_length; } else if (item_length > max_length) { return false; @@ -524,21 +527,18 @@ 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: case DataElement::TYPE_DISK_CACHE_ENTRY: case DataElement::TYPE_UNKNOWN: break; |