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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 Bind(&FileSystemFileUtil::CreateDirectory, | 188 Bind(&FileSystemFileUtil::CreateDirectory, |
189 Unretained(sync_file_util_.get()), | 189 Unretained(sync_file_util_.get()), |
190 base::Owned(context_ptr), url, exclusive, recursive), | 190 base::Owned(context_ptr), url, exclusive, recursive), |
191 callback); | 191 callback); |
192 DCHECK(success); | 192 DCHECK(success); |
193 } | 193 } |
194 | 194 |
195 void AsyncFileUtilAdapter::GetFileInfo( | 195 void AsyncFileUtilAdapter::GetFileInfo( |
196 scoped_ptr<FileSystemOperationContext> context, | 196 scoped_ptr<FileSystemOperationContext> context, |
197 const FileSystemURL& url, | 197 const FileSystemURL& url, |
| 198 int /* fields */, |
198 const GetFileInfoCallback& callback) { | 199 const GetFileInfoCallback& callback) { |
199 FileSystemOperationContext* context_ptr = context.release(); | 200 FileSystemOperationContext* context_ptr = context.release(); |
200 GetFileInfoHelper* helper = new GetFileInfoHelper; | 201 GetFileInfoHelper* helper = new GetFileInfoHelper; |
201 const bool success = context_ptr->task_runner()->PostTaskAndReply( | 202 const bool success = context_ptr->task_runner()->PostTaskAndReply( |
202 FROM_HERE, | 203 FROM_HERE, |
203 Bind(&GetFileInfoHelper::GetFileInfo, Unretained(helper), | 204 Bind(&GetFileInfoHelper::GetFileInfo, Unretained(helper), |
204 sync_file_util_.get(), base::Owned(context_ptr), url), | 205 sync_file_util_.get(), base::Owned(context_ptr), url), |
205 Bind(&GetFileInfoHelper::ReplyFileInfo, Owned(helper), callback)); | 206 Bind(&GetFileInfoHelper::ReplyFileInfo, Owned(helper), callback)); |
206 DCHECK(success); | 207 DCHECK(success); |
207 } | 208 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 GetFileInfoHelper* helper = new GetFileInfoHelper; | 342 GetFileInfoHelper* helper = new GetFileInfoHelper; |
342 const bool success = context_ptr->task_runner()->PostTaskAndReply( | 343 const bool success = context_ptr->task_runner()->PostTaskAndReply( |
343 FROM_HERE, | 344 FROM_HERE, |
344 Bind(&GetFileInfoHelper::CreateSnapshotFile, Unretained(helper), | 345 Bind(&GetFileInfoHelper::CreateSnapshotFile, Unretained(helper), |
345 sync_file_util_.get(), base::Owned(context_ptr), url), | 346 sync_file_util_.get(), base::Owned(context_ptr), url), |
346 Bind(&GetFileInfoHelper::ReplySnapshotFile, Owned(helper), callback)); | 347 Bind(&GetFileInfoHelper::ReplySnapshotFile, Owned(helper), callback)); |
347 DCHECK(success); | 348 DCHECK(success); |
348 } | 349 } |
349 | 350 |
350 } // namespace storage | 351 } // namespace storage |
OLD | NEW |