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

Side by Side Diff: chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc

Issue 518743002: Media gallery fixups for scoped_refptr<T> operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add callback typedef 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
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 // MTPDeviceDelegateImplWin implementation. 5 // MTPDeviceDelegateImplWin implementation.
6 6
7 #include "chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h" 7 #include "chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h"
8 8
9 #include <portabledevice.h> 9 #include <portabledevice.h>
10 10
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 weak_ptr_factory_.GetWeakPtr(), 441 weak_ptr_factory_.GetWeakPtr(),
442 base::Passed(&file_details)))); 442 base::Passed(&file_details))));
443 } 443 }
444 444
445 bool MTPDeviceDelegateImplWin::IsStreaming() { 445 bool MTPDeviceDelegateImplWin::IsStreaming() {
446 return false; 446 return false;
447 } 447 }
448 448
449 void MTPDeviceDelegateImplWin::ReadBytes( 449 void MTPDeviceDelegateImplWin::ReadBytes(
450 const base::FilePath& device_file_path, 450 const base::FilePath& device_file_path,
451 net::IOBuffer* buf, int64 offset, int buf_len, 451 const scoped_refptr<net::IOBuffer>& buf,
452 int64 offset,
453 int buf_len,
452 const ReadBytesSuccessCallback& success_callback, 454 const ReadBytesSuccessCallback& success_callback,
453 const ErrorCallback& error_callback) { 455 const ErrorCallback& error_callback) {
454 NOTREACHED(); 456 NOTREACHED();
455 } 457 }
456 458
457 void MTPDeviceDelegateImplWin::CancelPendingTasksAndDeleteDelegate() { 459 void MTPDeviceDelegateImplWin::CancelPendingTasksAndDeleteDelegate() {
458 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); 460 DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
459 PortableDeviceMapService::GetInstance()->MarkPortableDeviceForDeletion( 461 PortableDeviceMapService::GetInstance()->MarkPortableDeviceForDeletion(
460 storage_device_info_.registered_device_path); 462 storage_device_info_.registered_device_path);
461 media_task_runner_->PostTask( 463 media_task_runner_->PostTask(
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 current_snapshot_details_->file_info(), 616 current_snapshot_details_->file_info(),
615 current_snapshot_details_->request_info().snapshot_file_path); 617 current_snapshot_details_->request_info().snapshot_file_path);
616 } else { 618 } else {
617 current_snapshot_details_->request_info().error_callback.Run( 619 current_snapshot_details_->request_info().error_callback.Run(
618 base::File::FILE_ERROR_FAILED); 620 base::File::FILE_ERROR_FAILED);
619 } 621 }
620 task_in_progress_ = false; 622 task_in_progress_ = false;
621 current_snapshot_details_.reset(); 623 current_snapshot_details_.reset();
622 ProcessNextPendingRequest(); 624 ProcessNextPendingRequest();
623 } 625 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698