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/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "base/threading/worker_pool.h" | 16 #include "base/threading/worker_pool.h" |
17 #include "net/base/io_buffer.h" | 17 #include "net/base/io_buffer.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 void SetOffset(OVERLAPPED* overlapped, const LARGE_INTEGER& offset) { | 24 void SetOffset(OVERLAPPED* overlapped, const LARGE_INTEGER& offset) { |
25 overlapped->Offset = offset.LowPart; | 25 overlapped->Offset = offset.LowPart; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 236 |
237 IOResult error = IOResult::FromOSError(os_error); | 237 IOResult error = IOResult::FromOSError(os_error); |
238 if (error.os_error == ERROR_IO_PENDING) { | 238 if (error.os_error == ERROR_IO_PENDING) { |
239 InvokeUserCallback(); | 239 InvokeUserCallback(); |
240 } else { | 240 } else { |
241 OnIOCompleted(&io_context_, 0, error.os_error); | 241 OnIOCompleted(&io_context_, 0, error.os_error); |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 } // namespace net | 245 } // namespace net |
OLD | NEW |