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

Side by Side Diff: net/base/file_stream_context.h

Issue 623213004: replace OVERRIDE and FINAL with override and final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo unwanted change in comment Created 6 years, 2 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 | « net/base/dns_reloader.cc ('k') | net/base/keygen_handler_unittest.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 (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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 IOResult SeekFileImpl(base::File::Whence whence, int64 offset); 151 IOResult SeekFileImpl(base::File::Whence whence, int64 offset);
152 152
153 void OnFileOpened(); 153 void OnFileOpened();
154 154
155 #if defined(OS_WIN) 155 #if defined(OS_WIN)
156 void IOCompletionIsPending(const CompletionCallback& callback, IOBuffer* buf); 156 void IOCompletionIsPending(const CompletionCallback& callback, IOBuffer* buf);
157 157
158 // Implementation of MessageLoopForIO::IOHandler. 158 // Implementation of MessageLoopForIO::IOHandler.
159 virtual void OnIOCompleted(base::MessageLoopForIO::IOContext* context, 159 virtual void OnIOCompleted(base::MessageLoopForIO::IOContext* context,
160 DWORD bytes_read, 160 DWORD bytes_read,
161 DWORD error) OVERRIDE; 161 DWORD error) override;
162 #elif defined(OS_POSIX) 162 #elif defined(OS_POSIX)
163 // ReadFileImpl() is a simple wrapper around read() that handles EINTR 163 // ReadFileImpl() is a simple wrapper around read() that handles EINTR
164 // signals and calls RecordAndMapError() to map errno to net error codes. 164 // signals and calls RecordAndMapError() to map errno to net error codes.
165 IOResult ReadFileImpl(scoped_refptr<IOBuffer> buf, int buf_len); 165 IOResult ReadFileImpl(scoped_refptr<IOBuffer> buf, int buf_len);
166 166
167 // WriteFileImpl() is a simple wrapper around write() that handles EINTR 167 // WriteFileImpl() is a simple wrapper around write() that handles EINTR
168 // signals and calls MapSystemError() to map errno to net error codes. 168 // signals and calls MapSystemError() to map errno to net error codes.
169 // It tries to write to completion. 169 // It tries to write to completion.
170 IOResult WriteFileImpl(scoped_refptr<IOBuffer> buf, int buf_len); 170 IOResult WriteFileImpl(scoped_refptr<IOBuffer> buf, int buf_len);
171 #endif 171 #endif
172 172
173 base::File file_; 173 base::File file_;
174 bool async_in_progress_; 174 bool async_in_progress_;
175 bool orphaned_; 175 bool orphaned_;
176 scoped_refptr<base::TaskRunner> task_runner_; 176 scoped_refptr<base::TaskRunner> task_runner_;
177 177
178 #if defined(OS_WIN) 178 #if defined(OS_WIN)
179 base::MessageLoopForIO::IOContext io_context_; 179 base::MessageLoopForIO::IOContext io_context_;
180 CompletionCallback callback_; 180 CompletionCallback callback_;
181 scoped_refptr<IOBuffer> in_flight_buf_; 181 scoped_refptr<IOBuffer> in_flight_buf_;
182 #endif 182 #endif
183 183
184 DISALLOW_COPY_AND_ASSIGN(Context); 184 DISALLOW_COPY_AND_ASSIGN(Context);
185 }; 185 };
186 186
187 } // namespace net 187 } // namespace net
188 188
189 #endif // NET_BASE_FILE_STREAM_CONTEXT_H_ 189 #endif // NET_BASE_FILE_STREAM_CONTEXT_H_
OLDNEW
« no previous file with comments | « net/base/dns_reloader.cc ('k') | net/base/keygen_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698