OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/async_file_util_adapter.h" | 5 #include "storage/browser/fileapi/async_file_util_adapter.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 DCHECK(success); | 211 DCHECK(success); |
212 } | 212 } |
213 | 213 |
214 void AsyncFileUtilAdapter::ReadDirectory( | 214 void AsyncFileUtilAdapter::ReadDirectory( |
215 scoped_ptr<FileSystemOperationContext> context, | 215 scoped_ptr<FileSystemOperationContext> context, |
216 const FileSystemURL& url, | 216 const FileSystemURL& url, |
217 const ReadDirectoryCallback& callback) { | 217 const ReadDirectoryCallback& callback) { |
218 FileSystemOperationContext* context_ptr = context.release(); | 218 FileSystemOperationContext* context_ptr = context.release(); |
219 const bool success = context_ptr->task_runner()->PostTask( | 219 const bool success = context_ptr->task_runner()->PostTask( |
220 FROM_HERE, | 220 FROM_HERE, |
221 Bind(&ReadDirectoryHelper, | 221 Bind(&ReadDirectoryHelper, sync_file_util_.get(), |
222 sync_file_util_.get(), base::Owned(context_ptr), url, | 222 base::Owned(context_ptr), url, |
223 base::ThreadTaskRunnerHandle::Get(), callback)); | 223 base::RetainedRef(base::ThreadTaskRunnerHandle::Get()), callback)); |
224 DCHECK(success); | 224 DCHECK(success); |
225 } | 225 } |
226 | 226 |
227 void AsyncFileUtilAdapter::Touch( | 227 void AsyncFileUtilAdapter::Touch( |
228 scoped_ptr<FileSystemOperationContext> context, | 228 scoped_ptr<FileSystemOperationContext> context, |
229 const FileSystemURL& url, | 229 const FileSystemURL& url, |
230 const base::Time& last_access_time, | 230 const base::Time& last_access_time, |
231 const base::Time& last_modified_time, | 231 const base::Time& last_modified_time, |
232 const StatusCallback& callback) { | 232 const StatusCallback& callback) { |
233 FileSystemOperationContext* context_ptr = context.release(); | 233 FileSystemOperationContext* context_ptr = context.release(); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 GetFileInfoHelper* helper = new GetFileInfoHelper; | 346 GetFileInfoHelper* helper = new GetFileInfoHelper; |
347 const bool success = context_ptr->task_runner()->PostTaskAndReply( | 347 const bool success = context_ptr->task_runner()->PostTaskAndReply( |
348 FROM_HERE, | 348 FROM_HERE, |
349 Bind(&GetFileInfoHelper::CreateSnapshotFile, Unretained(helper), | 349 Bind(&GetFileInfoHelper::CreateSnapshotFile, Unretained(helper), |
350 sync_file_util_.get(), base::Owned(context_ptr), url), | 350 sync_file_util_.get(), base::Owned(context_ptr), url), |
351 Bind(&GetFileInfoHelper::ReplySnapshotFile, Owned(helper), callback)); | 351 Bind(&GetFileInfoHelper::ReplySnapshotFile, Owned(helper), callback)); |
352 DCHECK(success); | 352 DCHECK(success); |
353 } | 353 } |
354 | 354 |
355 } // namespace storage | 355 } // namespace storage |
OLD | NEW |