| 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> | 13 #include <stdint.h> |
| 14 | 14 |
| 15 #include "base/files/file.h" | 15 #include "base/files/file.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/scoped_ptr.h" |
| 17 #include "net/base/completion_callback.h" | 18 #include "net/base/completion_callback.h" |
| 18 #include "net/base/net_export.h" | 19 #include "net/base/net_export.h" |
| 19 | 20 |
| 20 namespace base { | 21 namespace base { |
| 21 class FilePath; | 22 class FilePath; |
| 22 class TaskRunner; | 23 class TaskRunner; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace net { | 26 namespace net { |
| 26 | 27 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // without explicitly calling Close, the file should be closed asynchronously | 152 // without explicitly calling Close, the file should be closed asynchronously |
| 152 // without delaying FileStream's destructor. | 153 // without delaying FileStream's destructor. |
| 153 scoped_ptr<Context> context_; | 154 scoped_ptr<Context> context_; |
| 154 | 155 |
| 155 DISALLOW_COPY_AND_ASSIGN(FileStream); | 156 DISALLOW_COPY_AND_ASSIGN(FileStream); |
| 156 }; | 157 }; |
| 157 | 158 |
| 158 } // namespace net | 159 } // namespace net |
| 159 | 160 |
| 160 #endif // NET_BASE_FILE_STREAM_H_ | 161 #endif // NET_BASE_FILE_STREAM_H_ |
| OLD | NEW |