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

Side by Side Diff: chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc

Issue 505283002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/media_galleries/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h" 5 #include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 const CreateSnapshotFileCallback& callback) { 425 const CreateSnapshotFileCallback& callback) {
426 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); 426 DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
427 MTPDeviceAsyncDelegate* delegate = GetMTPDeviceDelegate(url); 427 MTPDeviceAsyncDelegate* delegate = GetMTPDeviceDelegate(url);
428 if (!delegate) { 428 if (!delegate) {
429 OnCreateSnapshotFileError(callback, base::File::FILE_ERROR_NOT_FOUND); 429 OnCreateSnapshotFileError(callback, base::File::FILE_ERROR_NOT_FOUND);
430 return; 430 return;
431 } 431 }
432 432
433 scoped_refptr<base::SequencedTaskRunner> task_runner(context->task_runner()); 433 scoped_refptr<base::SequencedTaskRunner> task_runner(context->task_runner());
434 base::PostTaskAndReplyWithResult( 434 base::PostTaskAndReplyWithResult(
435 task_runner, 435 task_runner.get(),
436 FROM_HERE, 436 FROM_HERE,
437 base::Bind(&CreateSnapshotFileOnBlockingPool, url.path(), profile_path_), 437 base::Bind(&CreateSnapshotFileOnBlockingPool, url.path(), profile_path_),
438 base::Bind(&OnSnapshotFileCreatedRunTask, 438 base::Bind(&OnSnapshotFileCreatedRunTask,
439 base::Passed(&context), 439 base::Passed(&context),
440 callback, 440 callback,
441 url, 441 url,
442 validate_media_files())); 442 validate_media_files()));
443 } 443 }
444 444
445 scoped_ptr<storage::FileStreamReader> 445 scoped_ptr<storage::FileStreamReader>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 FROM_HERE, 507 FROM_HERE,
508 base::Bind(&MediaPathFilterWrapper::FilterMediaEntries, 508 base::Bind(&MediaPathFilterWrapper::FilterMediaEntries,
509 media_path_filter_wrapper_, 509 media_path_filter_wrapper_,
510 file_list), 510 file_list),
511 base::Bind(&OnDidCheckMediaForReadDirectory, callback, has_more)); 511 base::Bind(&OnDidCheckMediaForReadDirectory, callback, has_more));
512 } 512 }
513 513
514 bool DeviceMediaAsyncFileUtil::validate_media_files() const { 514 bool DeviceMediaAsyncFileUtil::validate_media_files() const {
515 return media_path_filter_wrapper_.get() != NULL; 515 return media_path_filter_wrapper_.get() != NULL;
516 } 516 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698