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

Side by Side Diff: content/browser/fileapi/upload_file_system_file_element_reader.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "webkit/browser/blob/file_stream_reader.h" 11 #include "storage/browser/blob/file_stream_reader.h"
12 #include "webkit/browser/fileapi/file_system_context.h" 12 #include "storage/browser/fileapi/file_system_context.h"
13 #include "webkit/browser/fileapi/file_system_url.h" 13 #include "storage/browser/fileapi/file_system_url.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 UploadFileSystemFileElementReader::UploadFileSystemFileElementReader( 17 UploadFileSystemFileElementReader::UploadFileSystemFileElementReader(
18 fileapi::FileSystemContext* file_system_context, 18 storage::FileSystemContext* file_system_context,
19 const GURL& url, 19 const GURL& url,
20 uint64 range_offset, 20 uint64 range_offset,
21 uint64 range_length, 21 uint64 range_length,
22 const base::Time& expected_modification_time) 22 const base::Time& expected_modification_time)
23 : file_system_context_(file_system_context), 23 : file_system_context_(file_system_context),
24 url_(url), 24 url_(url),
25 range_offset_(range_offset), 25 range_offset_(range_offset),
26 range_length_(range_length), 26 range_length_(range_length),
27 expected_modification_time_(expected_modification_time), 27 expected_modification_time_(expected_modification_time),
28 stream_length_(0), 28 stream_length_(0),
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 int result) { 108 int result) {
109 if (result > 0) { 109 if (result > 0) {
110 position_ += result; 110 position_ += result;
111 DCHECK_LE(position_, GetContentLength()); 111 DCHECK_LE(position_, GetContentLength());
112 } 112 }
113 if (!callback.is_null()) 113 if (!callback.is_null())
114 callback.Run(result); 114 callback.Run(result);
115 } 115 }
116 116
117 } // namespace content 117 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698