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

Side by Side Diff: webkit/chromeos/fileapi/async_file_stream.h

Issue 8907014: Implement async verision of FileSystemFileUtil and in-memory file system for testing purposes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_FILEAPI_ASYNC_FILE_STREAM_H_
6 #define WEBKIT_FILEAPI_ASYNC_FILE_STREAM_H_
kinuko 2011/12/14 03:39:22 nit: needs to be updated as well (to add CHROMEOS_
satorux1 2011/12/14 04:43:26 Done.
7
8 #include "base/platform_file.h"
9 #include "base/callback.h"
10
11 namespace fileapi {
12
13 using base::PlatformFileError;
14
15 typedef base::Callback<void(PlatformFileError, int64)> ReadWriteCallback;
16 typedef base::Callback<void(PlatformFileError)> StatusCallback;
17
18 // Abstract class similar to net::FileStream, but supporting only
19 // the asyncronous operations and not necessarily relying on PlatformFile.
20 class AsyncFileStream {
21 public:
22 virtual ~AsyncFileStream() {};
23
24 virtual void Read(char* buffer,
25 int64 length,
26 const ReadWriteCallback& callback) = 0;
satorux1 2011/12/14 05:19:55 The API looks error-prone. The caller needs to mai
satorux1 2011/12/14 06:55:17 I take it back. We could design an API that does n
27
28 virtual void Write(const char* buffer,
29 int64 length,
30 const ReadWriteCallback& callback) = 0;
31
32 virtual void Seek(int64 offset,
33 const StatusCallback& callback) = 0;
34 };
35
36 } // namespace fileapi
37
38 #endif // WEBKIT_FILEAPI_ASYNC_FILE_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/chromeos/fileapi/file_util_async.h » ('j') | webkit/chromeos/fileapi/file_util_async.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698