Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: storage/browser/fileapi/async_file_util_adapter.cc

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « storage/browser/database/database_quota_client.cc ('k') | storage/browser/fileapi/file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698