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

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

Issue 947943002: Implement CopyFileFromLocal of MTPDeviceAsyncDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failed test case. Created 5 years, 10 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 "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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 384 }
385 385
386 void DeviceMediaAsyncFileUtil::CopyInForeignFile( 386 void DeviceMediaAsyncFileUtil::CopyInForeignFile(
387 scoped_ptr<FileSystemOperationContext> context, 387 scoped_ptr<FileSystemOperationContext> context,
388 const base::FilePath& src_file_path, 388 const base::FilePath& src_file_path,
389 const FileSystemURL& dest_url, 389 const FileSystemURL& dest_url,
390 const StatusCallback& callback) { 390 const StatusCallback& callback) {
391 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); 391 DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
392 NOTIMPLEMENTED(); 392 NOTIMPLEMENTED();
393 callback.Run(base::File::FILE_ERROR_SECURITY); 393 callback.Run(base::File::FILE_ERROR_SECURITY);
394 // TODO(yawano): Connect CopyInForeignFile to
395 // MTPDeviceAsyncDelegate::CopyFileFromLocal.
394 } 396 }
395 397
396 void DeviceMediaAsyncFileUtil::DeleteFile( 398 void DeviceMediaAsyncFileUtil::DeleteFile(
397 scoped_ptr<FileSystemOperationContext> context, 399 scoped_ptr<FileSystemOperationContext> context,
398 const FileSystemURL& url, 400 const FileSystemURL& url,
399 const StatusCallback& callback) { 401 const StatusCallback& callback) {
400 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); 402 DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
401 NOTIMPLEMENTED(); 403 NOTIMPLEMENTED();
402 callback.Run(base::File::FILE_ERROR_SECURITY); 404 callback.Run(base::File::FILE_ERROR_SECURITY);
403 } 405 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 FROM_HERE, 509 FROM_HERE,
508 base::Bind(&MediaPathFilterWrapper::FilterMediaEntries, 510 base::Bind(&MediaPathFilterWrapper::FilterMediaEntries,
509 media_path_filter_wrapper_, 511 media_path_filter_wrapper_,
510 file_list), 512 file_list),
511 base::Bind(&OnDidCheckMediaForReadDirectory, callback, has_more)); 513 base::Bind(&OnDidCheckMediaForReadDirectory, callback, has_more));
512 } 514 }
513 515
514 bool DeviceMediaAsyncFileUtil::validate_media_files() const { 516 bool DeviceMediaAsyncFileUtil::validate_media_files() const {
515 return media_path_filter_wrapper_.get() != NULL; 517 return media_path_filter_wrapper_.get() != NULL;
516 } 518 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698