OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/fileapi/upload_file_system_file_element_reader.h" | 5 #include "content/browser/fileapi/upload_file_system_file_element_reader.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/numerics/safe_conversions.h" | 11 #include "base/numerics/safe_conversions.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "storage/browser/blob/file_stream_reader.h" | 13 #include "storage/browser/fileapi/file_stream_reader.h" |
14 #include "storage/browser/fileapi/file_system_context.h" | 14 #include "storage/browser/fileapi/file_system_context.h" |
15 #include "storage/browser/fileapi/file_system_url.h" | 15 #include "storage/browser/fileapi/file_system_url.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 UploadFileSystemFileElementReader::UploadFileSystemFileElementReader( | 19 UploadFileSystemFileElementReader::UploadFileSystemFileElementReader( |
20 storage::FileSystemContext* file_system_context, | 20 storage::FileSystemContext* file_system_context, |
21 const GURL& url, | 21 const GURL& url, |
22 uint64 range_offset, | 22 uint64 range_offset, |
23 uint64 range_length, | 23 uint64 range_length, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 int result) { | 112 int result) { |
113 if (result > 0) { | 113 if (result > 0) { |
114 position_ += result; | 114 position_ += result; |
115 DCHECK_LE(position_, GetContentLength()); | 115 DCHECK_LE(position_, GetContentLength()); |
116 } | 116 } |
117 if (!callback.is_null()) | 117 if (!callback.is_null()) |
118 callback.Run(result); | 118 callback.Run(result); |
119 } | 119 } |
120 | 120 |
121 } // namespace content | 121 } // namespace content |
OLD | NEW |