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

Side by Side Diff: components/filesystem/file_impl.h

Issue 1643733002: Revert of mojo filesystem: Simplify full file reading/writing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « components/filesystem/directory_impl_unittest.cc ('k') | components/filesystem/file_impl.cc » ('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 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 #ifndef COMPONENTS_FILESYSTEM_FILE_IMPL_H_ 5 #ifndef COMPONENTS_FILESYSTEM_FILE_IMPL_H_
6 #define COMPONENTS_FILESYSTEM_FILE_IMPL_H_ 6 #define COMPONENTS_FILESYSTEM_FILE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 16 matching lines...) Expand all
27 uint32_t flags); 27 uint32_t flags);
28 FileImpl(mojo::InterfaceRequest<File> request, base::File file); 28 FileImpl(mojo::InterfaceRequest<File> request, base::File file);
29 ~FileImpl() override; 29 ~FileImpl() override;
30 30
31 // |File| implementation: 31 // |File| implementation:
32 void Close(const CloseCallback& callback) override; 32 void Close(const CloseCallback& callback) override;
33 void Read(uint32_t num_bytes_to_read, 33 void Read(uint32_t num_bytes_to_read,
34 int64_t offset, 34 int64_t offset,
35 Whence whence, 35 Whence whence,
36 const ReadCallback& callback) override; 36 const ReadCallback& callback) override;
37 void ReadEntireFile(const ReadEntireFileCallback& callback) override;
37 void Write(mojo::Array<uint8_t> bytes_to_write, 38 void Write(mojo::Array<uint8_t> bytes_to_write,
38 int64_t offset, 39 int64_t offset,
39 Whence whence, 40 Whence whence,
40 const WriteCallback& callback) override; 41 const WriteCallback& callback) override;
41 void Tell(const TellCallback& callback) override; 42 void Tell(const TellCallback& callback) override;
42 void Seek(int64_t offset, 43 void Seek(int64_t offset,
43 Whence whence, 44 Whence whence,
44 const SeekCallback& callback) override; 45 const SeekCallback& callback) override;
45 void Stat(const StatCallback& callback) override; 46 void Stat(const StatCallback& callback) override;
46 void Truncate(int64_t size, const TruncateCallback& callback) override; 47 void Truncate(int64_t size, const TruncateCallback& callback) override;
47 void Touch(TimespecOrNowPtr atime, 48 void Touch(TimespecOrNowPtr atime,
48 TimespecOrNowPtr mtime, 49 TimespecOrNowPtr mtime,
49 const TouchCallback& callback) override; 50 const TouchCallback& callback) override;
50 void Dup(mojo::InterfaceRequest<File> file, 51 void Dup(mojo::InterfaceRequest<File> file,
51 const DupCallback& callback) override; 52 const DupCallback& callback) override;
52 void Flush(const FlushCallback& callback) override; 53 void Flush(const FlushCallback& callback) override;
53 void AsHandle(const AsHandleCallback& callback) override; 54 void AsHandle(const AsHandleCallback& callback) override;
54 55
55 private: 56 private:
56 mojo::StrongBinding<File> binding_; 57 mojo::StrongBinding<File> binding_;
57 base::File file_; 58 base::File file_;
58 59
59 DISALLOW_COPY_AND_ASSIGN(FileImpl); 60 DISALLOW_COPY_AND_ASSIGN(FileImpl);
60 }; 61 };
61 62
62 } // namespace filesystem 63 } // namespace filesystem
63 64
64 #endif // COMPONENTS_FILESYSTEM_FILE_IMPL_H_ 65 #endif // COMPONENTS_FILESYSTEM_FILE_IMPL_H_
OLDNEW
« no previous file with comments | « components/filesystem/directory_impl_unittest.cc ('k') | components/filesystem/file_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698