| 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 #include "net/base/file_stream_context.h" | 5 #include "net/base/file_stream_context.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 14 #include "base/task_runner.h" | 14 #include "base/task_runner.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "base/threading/worker_pool.h" | |
| 17 #include "net/base/io_buffer.h" | 16 #include "net/base/io_buffer.h" |
| 18 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 19 | 18 |
| 20 namespace net { | 19 namespace net { |
| 21 | 20 |
| 22 namespace { | 21 namespace { |
| 23 | 22 |
| 24 void SetOffset(OVERLAPPED* overlapped, const LARGE_INTEGER& offset) { | 23 void SetOffset(OVERLAPPED* overlapped, const LARGE_INTEGER& offset) { |
| 25 overlapped->Offset = offset.LowPart; | 24 overlapped->Offset = offset.LowPart; |
| 26 overlapped->OffsetHigh = offset.HighPart; | 25 overlapped->OffsetHigh = offset.HighPart; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 237 |
| 239 IOResult error = IOResult::FromOSError(os_error); | 238 IOResult error = IOResult::FromOSError(os_error); |
| 240 if (error.os_error == ERROR_IO_PENDING) { | 239 if (error.os_error == ERROR_IO_PENDING) { |
| 241 InvokeUserCallback(); | 240 InvokeUserCallback(); |
| 242 } else { | 241 } else { |
| 243 OnIOCompleted(&io_context_, 0, error.os_error); | 242 OnIOCompleted(&io_context_, 0, error.os_error); |
| 244 } | 243 } |
| 245 } | 244 } |
| 246 | 245 |
| 247 } // namespace net | 246 } // namespace net |
| OLD | NEW |