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::Context class. | 5 // This file defines FileStream::Context class. |
6 // The general design of FileStream is as follows: file_stream.h defines | 6 // The general design of FileStream is as follows: file_stream.h defines |
7 // FileStream class which basically is just an "wrapper" not containing any | 7 // FileStream class which basically is just an "wrapper" not containing any |
8 // specific implementation details. It re-routes all its method calls to | 8 // specific implementation details. It re-routes all its method calls to |
9 // the instance of FileStream::Context (FileStream holds a scoped_ptr to | 9 // the instance of FileStream::Context (FileStream holds a scoped_ptr to |
10 // FileStream::Context instance). Context was extracted into a different class | 10 // FileStream::Context instance). Context was extracted into a different class |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 OpenResult OpenFileImpl(const base::FilePath& path, int open_flags); | 162 OpenResult OpenFileImpl(const base::FilePath& path, int open_flags); |
163 | 163 |
164 IOResult CloseFileImpl(); | 164 IOResult CloseFileImpl(); |
165 | 165 |
166 void ProcessOpenError(const IOResult& result); | 166 void ProcessOpenError(const IOResult& result); |
167 void OnOpenCompleted(const CompletionCallback& callback, | 167 void OnOpenCompleted(const CompletionCallback& callback, |
168 OpenResult open_result); | 168 OpenResult open_result); |
169 | 169 |
170 void CloseAndDelete(); | 170 void CloseAndDelete(); |
171 void OnCloseCompleted(); | |
172 | 171 |
173 Int64CompletionCallback IntToInt64(const CompletionCallback& callback); | 172 Int64CompletionCallback IntToInt64(const CompletionCallback& callback); |
174 | 173 |
175 // Called when asynchronous Seek() is completed. | 174 // Called when asynchronous Seek() is completed. |
176 // Reports error if needed and calls callback. | 175 // Reports error if needed and calls callback. |
177 void ProcessAsyncResult(const Int64CompletionCallback& callback, | 176 void ProcessAsyncResult(const Int64CompletionCallback& callback, |
178 FileErrorSource source, | 177 FileErrorSource source, |
179 const IOResult& result); | 178 const IOResult& result); |
180 | 179 |
181 // Called when asynchronous Open() or Seek() | 180 // Called when asynchronous Open() or Seek() |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 FileErrorSource error_source_; | 241 FileErrorSource error_source_; |
243 #endif | 242 #endif |
244 | 243 |
245 DISALLOW_COPY_AND_ASSIGN(Context); | 244 DISALLOW_COPY_AND_ASSIGN(Context); |
246 }; | 245 }; |
247 | 246 |
248 } // namespace net | 247 } // namespace net |
249 | 248 |
250 #endif // NET_BASE_FILE_STREAM_CONTEXT_H_ | 249 #endif // NET_BASE_FILE_STREAM_CONTEXT_H_ |
251 | 250 |
OLD | NEW |