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 "storage/browser/fileapi/file_writer_delegate.h" | 5 #include "storage/browser/fileapi/file_writer_delegate.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_util_proxy.h" | 9 #include "base/files/file_util_proxy.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/message_loop/message_loop_proxy.h" | |
12 #include "base/sequenced_task_runner.h" | 11 #include "base/sequenced_task_runner.h" |
13 #include "base/threading/thread_restrictions.h" | 12 #include "base/threading/thread_restrictions.h" |
14 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
15 #include "storage/browser/fileapi/file_stream_writer.h" | 14 #include "storage/browser/fileapi/file_stream_writer.h" |
16 #include "storage/browser/fileapi/file_system_context.h" | 15 #include "storage/browser/fileapi/file_system_context.h" |
17 #include "storage/common/fileapi/file_system_mount_option.h" | 16 #include "storage/common/fileapi/file_system_mount_option.h" |
18 #include "storage/common/fileapi/file_system_util.h" | 17 #include "storage/common/fileapi/file_system_util.h" |
19 | 18 |
20 namespace storage { | 19 namespace storage { |
21 | 20 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 if (error == base::File::FILE_OK && flush_error != net::OK) { | 236 if (error == base::File::FILE_OK && flush_error != net::OK) { |
238 // If the Flush introduced an error, overwrite the status. | 237 // If the Flush introduced an error, overwrite the status. |
239 // Otherwise, keep the original error status. | 238 // Otherwise, keep the original error status. |
240 error = NetErrorToFileError(flush_error); | 239 error = NetErrorToFileError(flush_error); |
241 progress_status = GetCompletionStatusOnError(); | 240 progress_status = GetCompletionStatusOnError(); |
242 } | 241 } |
243 write_callback_.Run(error, bytes_written, progress_status); | 242 write_callback_.Run(error, bytes_written, progress_status); |
244 } | 243 } |
245 | 244 |
246 } // namespace storage | 245 } // namespace storage |
OLD | NEW |