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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/elements_upload_data_stream.cc ('k') | net/base/file_stream_context.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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 void Seek(base::File::Whence whence, 94 void Seek(base::File::Whence whence,
95 int64 offset, 95 int64 offset,
96 const Int64CompletionCallback& callback); 96 const Int64CompletionCallback& callback);
97 97
98 void Flush(const CompletionCallback& callback); 98 void Flush(const CompletionCallback& callback);
99 99
100 private: 100 private:
101 struct IOResult { 101 struct IOResult {
102 IOResult(); 102 IOResult();
103 IOResult(int64 result, int os_error); 103 IOResult(int64 result, logging::SystemErrorCode os_error);
104 static IOResult FromOSError(int64 os_error); 104 static IOResult FromOSError(logging::SystemErrorCode os_error);
105 105
106 int64 result; 106 int64 result;
107 int os_error; // Set only when result < 0. 107 logging::SystemErrorCode os_error; // Set only when result < 0.
108 }; 108 };
109 109
110 struct OpenResult { 110 struct OpenResult {
111 MOVE_ONLY_TYPE_FOR_CPP_03(OpenResult, RValue) 111 MOVE_ONLY_TYPE_FOR_CPP_03(OpenResult, RValue)
112 public: 112 public:
113 OpenResult(); 113 OpenResult();
114 OpenResult(base::File file, IOResult error_code); 114 OpenResult(base::File file, IOResult error_code);
115 // C++03 move emulation of this type. 115 // C++03 move emulation of this type.
116 OpenResult(RValue other); 116 OpenResult(RValue other);
117 OpenResult& operator=(RValue other); 117 OpenResult& operator=(RValue other);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/elements_upload_data_stream.cc ('k') | net/base/file_stream_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698