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/sandbox_file_stream_writer.h" | 5 #include "storage/browser/fileapi/sandbox_file_stream_writer.h" |
6 | 6 |
7 #include "base/files/file_util_proxy.h" | 7 #include "base/files/file_util_proxy.h" |
8 #include "base/sequenced_task_runner.h" | 8 #include "base/sequenced_task_runner.h" |
9 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
11 #include "storage/browser/fileapi/file_observers.h" | 11 #include "storage/browser/fileapi/file_observers.h" |
12 #include "storage/browser/fileapi/file_stream_reader.h" | 12 #include "storage/browser/fileapi/file_stream_reader.h" |
13 #include "storage/browser/fileapi/file_stream_writer.h" | |
14 #include "storage/browser/fileapi/file_system_context.h" | 13 #include "storage/browser/fileapi/file_system_context.h" |
15 #include "storage/browser/fileapi/file_system_operation_runner.h" | 14 #include "storage/browser/fileapi/file_system_operation_runner.h" |
16 #include "storage/browser/quota/quota_manager_proxy.h" | 15 #include "storage/browser/quota/quota_manager_proxy.h" |
17 #include "storage/common/fileapi/file_system_util.h" | 16 #include "storage/common/fileapi/file_system_util.h" |
18 | 17 |
19 namespace storage { | 18 namespace storage { |
20 | 19 |
21 namespace { | 20 namespace { |
22 | 21 |
23 // Adjust the |quota| value in overwriting case (i.e. |file_size| > 0 and | 22 // Adjust the |quota| value in overwriting case (i.e. |file_size| > 0 and |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 DCHECK(cancel_callback_.is_null()); | 237 DCHECK(cancel_callback_.is_null()); |
239 | 238 |
240 // Write() is not called yet, so there's nothing to flush. | 239 // Write() is not called yet, so there's nothing to flush. |
241 if (!local_file_writer_) | 240 if (!local_file_writer_) |
242 return net::OK; | 241 return net::OK; |
243 | 242 |
244 return local_file_writer_->Flush(callback); | 243 return local_file_writer_->Flush(callback); |
245 } | 244 } |
246 | 245 |
247 } // namespace storage | 246 } // namespace storage |
OLD | NEW |