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

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

Issue 1634293002: mojo filesystem: Simplify full file reading/writing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove check Created 4 years, 10 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;
38 void Write(mojo::Array<uint8_t> bytes_to_write, 37 void Write(mojo::Array<uint8_t> bytes_to_write,
39 int64_t offset, 38 int64_t offset,
40 Whence whence, 39 Whence whence,
41 const WriteCallback& callback) override; 40 const WriteCallback& callback) override;
42 void Tell(const TellCallback& callback) override; 41 void Tell(const TellCallback& callback) override;
43 void Seek(int64_t offset, 42 void Seek(int64_t offset,
44 Whence whence, 43 Whence whence,
45 const SeekCallback& callback) override; 44 const SeekCallback& callback) override;
46 void Stat(const StatCallback& callback) override; 45 void Stat(const StatCallback& callback) override;
47 void Truncate(int64_t size, const TruncateCallback& callback) override; 46 void Truncate(int64_t size, const TruncateCallback& callback) override;
48 void Touch(TimespecOrNowPtr atime, 47 void Touch(TimespecOrNowPtr atime,
49 TimespecOrNowPtr mtime, 48 TimespecOrNowPtr mtime,
50 const TouchCallback& callback) override; 49 const TouchCallback& callback) override;
51 void Dup(mojo::InterfaceRequest<File> file, 50 void Dup(mojo::InterfaceRequest<File> file,
52 const DupCallback& callback) override; 51 const DupCallback& callback) override;
53 void Flush(const FlushCallback& callback) override; 52 void Flush(const FlushCallback& callback) override;
54 void AsHandle(const AsHandleCallback& callback) override; 53 void AsHandle(const AsHandleCallback& callback) override;
55 54
56 private: 55 private:
57 mojo::StrongBinding<File> binding_; 56 mojo::StrongBinding<File> binding_;
58 base::File file_; 57 base::File file_;
59 58
60 DISALLOW_COPY_AND_ASSIGN(FileImpl); 59 DISALLOW_COPY_AND_ASSIGN(FileImpl);
61 }; 60 };
62 61
63 } // namespace filesystem 62 } // namespace filesystem
64 63
65 #endif // COMPONENTS_FILESYSTEM_FILE_IMPL_H_ 64 #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