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

Side by Side Diff: webkit/blob/file_stream_reader.h

Issue 11103031: webkit: Merge blob and fileapi into one build target 'storage' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Leave *.gypi files in blob and fileapi Created 8 years, 2 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
« no previous file with comments | « webkit/blob/blob_url_request_job_factory.h ('k') | webkit/blob/local_file_stream_reader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef WEBKIT_BLOB_FILE_STREAM_READER_H_ 5 #ifndef WEBKIT_BLOB_FILE_STREAM_READER_H_
6 #define WEBKIT_BLOB_FILE_STREAM_READER_H_ 6 #define WEBKIT_BLOB_FILE_STREAM_READER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
11 #include "webkit/blob/blob_export.h" 11 #include "webkit/storage/webkit_storage_export.h"
12 12
13 namespace net { 13 namespace net {
14 class IOBuffer; 14 class IOBuffer;
15 } 15 }
16 16
17 namespace webkit_blob { 17 namespace webkit_blob {
18 18
19 // A generic interface for reading a file-like object. 19 // A generic interface for reading a file-like object.
20 class BLOB_EXPORT FileStreamReader { 20 class WEBKIT_STORAGE_EXPORT FileStreamReader {
21 public: 21 public:
22 // It is valid to delete the reader at any time. If the stream is deleted 22 // It is valid to delete the reader at any time. If the stream is deleted
23 // while it has a pending read, its callback will not be called. 23 // while it has a pending read, its callback will not be called.
24 virtual ~FileStreamReader() {} 24 virtual ~FileStreamReader() {}
25 25
26 // Reads from the current cursor position asynchronously. 26 // Reads from the current cursor position asynchronously.
27 // 27 //
28 // Up to buf_len bytes will be copied into buf. (In other words, partial 28 // Up to buf_len bytes will be copied into buf. (In other words, partial
29 // reads are allowed.) Returns the number of bytes copied, 0 if at 29 // reads are allowed.) Returns the number of bytes copied, 0 if at
30 // end-of-file, or an error code if the operation could not be performed. 30 // end-of-file, or an error code if the operation could not be performed.
(...skipping 13 matching lines...) Expand all
44 // expected_modification_time_ (rv >= 0 cases). 44 // expected_modification_time_ (rv >= 0 cases).
45 // Otherwise, a negative error code is returned (rv < 0 cases). 45 // Otherwise, a negative error code is returned (rv < 0 cases).
46 // If the stream is deleted while it has an in-flight GetLength operation 46 // If the stream is deleted while it has an in-flight GetLength operation
47 // |callback| will not be called. 47 // |callback| will not be called.
48 virtual int GetLength(const net::Int64CompletionCallback& callback) = 0; 48 virtual int GetLength(const net::Int64CompletionCallback& callback) = 0;
49 }; 49 };
50 50
51 } // namespace webkit_blob 51 } // namespace webkit_blob
52 52
53 #endif // WEBKIT_BLOB_FILE_STREAM_READER_H_ 53 #endif // WEBKIT_BLOB_FILE_STREAM_READER_H_
OLDNEW
« no previous file with comments | « webkit/blob/blob_url_request_job_factory.h ('k') | webkit/blob/local_file_stream_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698