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 <errno.h> | 7 #include <errno.h> |
8 | 8 |
9 #include "base/basictypes.h" | |
10 #include "base/bind.h" | 9 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
12 #include "base/callback.h" | 11 #include "base/callback.h" |
13 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
14 #include "base/location.h" | 13 #include "base/location.h" |
15 #include "base/logging.h" | 14 #include "base/logging.h" |
16 #include "base/posix/eintr_wrapper.h" | 15 #include "base/posix/eintr_wrapper.h" |
17 #include "base/profiler/scoped_tracker.h" | 16 #include "base/profiler/scoped_tracker.h" |
18 #include "base/task_runner.h" | 17 #include "base/task_runner.h" |
19 #include "base/task_runner_util.h" | 18 #include "base/task_runner_util.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 scoped_refptr<IOBuffer> buf, | 106 scoped_refptr<IOBuffer> buf, |
108 int buf_len) { | 107 int buf_len) { |
109 int res = file_.WriteAtCurrentPosNoBestEffort(buf->data(), buf_len); | 108 int res = file_.WriteAtCurrentPosNoBestEffort(buf->data(), buf_len); |
110 if (res == -1) | 109 if (res == -1) |
111 return IOResult::FromOSError(errno); | 110 return IOResult::FromOSError(errno); |
112 | 111 |
113 return IOResult(res, 0); | 112 return IOResult(res, 0); |
114 } | 113 } |
115 | 114 |
116 } // namespace net | 115 } // namespace net |
OLD | NEW |