| OLD | NEW |
| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 base::File::Error RawUnlockFile(); | 43 base::File::Error RawUnlockFile(); |
| 44 | 44 |
| 45 const base::FilePath& path() const { return path_; } | 45 const base::FilePath& path() const { return path_; } |
| 46 | 46 |
| 47 // |File| implementation: | 47 // |File| implementation: |
| 48 void Close(const CloseCallback& callback) override; | 48 void Close(const CloseCallback& callback) override; |
| 49 void Read(uint32_t num_bytes_to_read, | 49 void Read(uint32_t num_bytes_to_read, |
| 50 int64_t offset, | 50 int64_t offset, |
| 51 mojom::Whence whence, | 51 mojom::Whence whence, |
| 52 const ReadCallback& callback) override; | 52 const ReadCallback& callback) override; |
| 53 void Write(mojo::Array<uint8_t> bytes_to_write, | 53 void Write(const std::vector<uint8_t>& bytes_to_write, |
| 54 int64_t offset, | 54 int64_t offset, |
| 55 mojom::Whence whence, | 55 mojom::Whence whence, |
| 56 const WriteCallback& callback) override; | 56 const WriteCallback& callback) override; |
| 57 void Tell(const TellCallback& callback) override; | 57 void Tell(const TellCallback& callback) override; |
| 58 void Seek(int64_t offset, | 58 void Seek(int64_t offset, |
| 59 mojom::Whence whence, | 59 mojom::Whence whence, |
| 60 const SeekCallback& callback) override; | 60 const SeekCallback& callback) override; |
| 61 void Stat(const StatCallback& callback) override; | 61 void Stat(const StatCallback& callback) override; |
| 62 void Truncate(int64_t size, const TruncateCallback& callback) override; | 62 void Truncate(int64_t size, const TruncateCallback& callback) override; |
| 63 void Touch(mojom::TimespecOrNowPtr atime, | 63 void Touch(mojom::TimespecOrNowPtr atime, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 74 base::FilePath path_; | 74 base::FilePath path_; |
| 75 scoped_refptr<SharedTempDir> temp_dir_; | 75 scoped_refptr<SharedTempDir> temp_dir_; |
| 76 scoped_refptr<LockTable> lock_table_; | 76 scoped_refptr<LockTable> lock_table_; |
| 77 | 77 |
| 78 DISALLOW_COPY_AND_ASSIGN(FileImpl); | 78 DISALLOW_COPY_AND_ASSIGN(FileImpl); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace filesystem | 81 } // namespace filesystem |
| 82 | 82 |
| 83 #endif // COMPONENTS_FILESYSTEM_FILE_IMPL_H_ | 83 #endif // COMPONENTS_FILESYSTEM_FILE_IMPL_H_ |
| OLD | NEW |