| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "storage/browser/blob/blob_reader.h" | 5 #include "storage/browser/blob/blob_reader.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <limits> | 11 #include <limits> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <utility> | 13 #include <utility> |
| 14 | 14 |
| 15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/callback_helpers.h" | 16 #include "base/callback_helpers.h" |
| 17 #include "base/debug/stack_trace.h" |
| 17 #include "base/sequenced_task_runner.h" | 18 #include "base/sequenced_task_runner.h" |
| 18 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 19 #include "base/trace_event/trace_event.h" | 20 #include "base/trace_event/trace_event.h" |
| 20 #include "net/base/io_buffer.h" | 21 #include "net/base/io_buffer.h" |
| 21 #include "net/base/net_errors.h" | 22 #include "net/base/net_errors.h" |
| 22 #include "net/disk_cache/disk_cache.h" | 23 #include "net/disk_cache/disk_cache.h" |
| 23 #include "storage/browser/blob/blob_data_handle.h" | 24 #include "storage/browser/blob/blob_data_handle.h" |
| 24 #include "storage/browser/blob/blob_data_snapshot.h" | 25 #include "storage/browser/blob/blob_data_snapshot.h" |
| 25 #include "storage/browser/fileapi/file_stream_reader.h" | 26 #include "storage/browser/fileapi/file_stream_reader.h" |
| 26 #include "storage/browser/fileapi/file_system_context.h" | 27 #include "storage/browser/fileapi/file_system_context.h" |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 void BlobReader::SetFileReaderAtIndex( | 665 void BlobReader::SetFileReaderAtIndex( |
| 665 size_t index, | 666 size_t index, |
| 666 std::unique_ptr<FileStreamReader> reader) { | 667 std::unique_ptr<FileStreamReader> reader) { |
| 667 if (reader) | 668 if (reader) |
| 668 index_to_reader_[index] = std::move(reader); | 669 index_to_reader_[index] = std::move(reader); |
| 669 else | 670 else |
| 670 index_to_reader_.erase(index); | 671 index_to_reader_.erase(index); |
| 671 } | 672 } |
| 672 | 673 |
| 673 } // namespace storage | 674 } // namespace storage |
| OLD | NEW |