| 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 "content/common/fileapi/webfilewriter_impl.h" | 5 #include "content/common/fileapi/webfilewriter_impl.h" |
| 6 | 6 |
| 7 #include "content/common/child_thread.h" | 7 #include "content/common/child_thread.h" |
| 8 #include "content/common/fileapi/file_system_dispatcher.h" | 8 #include "content/common/fileapi/file_system_dispatcher.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 WebFileWriterImpl::~WebFileWriterImpl() { | 68 WebFileWriterImpl::~WebFileWriterImpl() { |
| 69 } | 69 } |
| 70 | 70 |
| 71 void WebFileWriterImpl::DoTruncate(const GURL& path, int64 offset) { | 71 void WebFileWriterImpl::DoTruncate(const GURL& path, int64 offset) { |
| 72 // The FileSystemDispatcher takes ownership of the CallbackDispatcher. | 72 // The FileSystemDispatcher takes ownership of the CallbackDispatcher. |
| 73 GetFileSystemDispatcher()->Truncate(path, offset, &request_id_, | 73 GetFileSystemDispatcher()->Truncate(path, offset, &request_id_, |
| 74 new CallbackDispatcher(AsWeakPtr())); | 74 new CallbackDispatcher(AsWeakPtr())); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void WebFileWriterImpl::DoWrite( | 77 void WebFileWriterImpl::DoWrite( |
| 78 const GURL& path, const GURL& blob_url, int64 offset) { | 78 const GURL& path, const std::string& blob_uuid, int64 offset) { |
| 79 GetFileSystemDispatcher()->Write( | 79 GetFileSystemDispatcher()->Write( |
| 80 path, blob_url, offset, &request_id_, | 80 path, blob_uuid, offset, &request_id_, |
| 81 new CallbackDispatcher(AsWeakPtr())); | 81 new CallbackDispatcher(AsWeakPtr())); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void WebFileWriterImpl::DoCancel() { | 84 void WebFileWriterImpl::DoCancel() { |
| 85 GetFileSystemDispatcher()->Cancel(request_id_, | 85 GetFileSystemDispatcher()->Cancel(request_id_, |
| 86 new CallbackDispatcher(AsWeakPtr())); | 86 new CallbackDispatcher(AsWeakPtr())); |
| 87 } | 87 } |
| 88 | 88 |
| 89 } // namespace content | 89 } // namespace content |
| OLD | NEW |