Lines Matching defs:AsyncContext
131 // FileStream::AsyncContext ----------------------------------------------
133 class FileStream::AsyncContext {
135 AsyncContext();
136 ~AsyncContext();
158 // MessageLoop or by ~AsyncContext().
161 // The MessageLoopForIO that this AsyncContext is running on.
167 CompletionCallbackImpl<AsyncContext> background_io_completed_callback_;
169 // This is used to synchronize between the AsyncContext destructor (which runs
180 DISALLOW_COPY_AND_ASSIGN(AsyncContext);
183 FileStream::AsyncContext::AsyncContext()
187 this, &AsyncContext::OnBackgroundIOCompleted),
192 FileStream::AsyncContext::~AsyncContext() {
197 // MessageLoopForIO, but AsyncContext() got deleted before then.
209 void FileStream::AsyncContext::InitiateAsyncRead(
223 void FileStream::AsyncContext::InitiateAsyncWrite(
237 void FileStream::AsyncContext::OnBackgroundIOCompleted(int result) {
240 NewCallback(this, &AsyncContext::RunAsynchronousCallback));
245 void FileStream::AsyncContext::RunAsynchronousCallback() {
251 // anything, or we're in ~AsyncContext(), in which case this prevents the call
284 async_context_.reset(new AsyncContext());
318 async_context_.reset(new AsyncContext());