| OLD | NEW |
| 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 // This file defines FileStream, a basic interface for reading and writing files | 5 // This file defines FileStream, a basic interface for reading and writing files |
| 6 // synchronously or asynchronously with support for seeking to an offset. | 6 // synchronously or asynchronously with support for seeking to an offset. |
| 7 // Note that even when used asynchronously, only one operation is supported at | 7 // Note that even when used asynchronously, only one operation is supported at |
| 8 // a time. | 8 // a time. |
| 9 | 9 |
| 10 #ifndef NET_BASE_FILE_STREAM_H_ | 10 #ifndef NET_BASE_FILE_STREAM_H_ |
| 11 #define NET_BASE_FILE_STREAM_H_ | 11 #define NET_BASE_FILE_STREAM_H_ |
| 12 | 12 |
| 13 #include <stdint.h> |
| 14 |
| 13 #include "base/files/file.h" | 15 #include "base/files/file.h" |
| 16 #include "base/macros.h" |
| 14 #include "net/base/completion_callback.h" | 17 #include "net/base/completion_callback.h" |
| 15 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
| 16 | 19 |
| 17 namespace base { | 20 namespace base { |
| 18 class FilePath; | 21 class FilePath; |
| 19 class TaskRunner; | 22 class TaskRunner; |
| 20 } | 23 } |
| 21 | 24 |
| 22 namespace net { | 25 namespace net { |
| 23 | 26 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // without explicitly calling Close, the file should be closed asynchronously | 151 // without explicitly calling Close, the file should be closed asynchronously |
| 149 // without delaying FileStream's destructor. | 152 // without delaying FileStream's destructor. |
| 150 scoped_ptr<Context> context_; | 153 scoped_ptr<Context> context_; |
| 151 | 154 |
| 152 DISALLOW_COPY_AND_ASSIGN(FileStream); | 155 DISALLOW_COPY_AND_ASSIGN(FileStream); |
| 153 }; | 156 }; |
| 154 | 157 |
| 155 } // namespace net | 158 } // namespace net |
| 156 | 159 |
| 157 #endif // NET_BASE_FILE_STREAM_H_ | 160 #endif // NET_BASE_FILE_STREAM_H_ |
| OLD | NEW |