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

Side by Side Diff: chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm

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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/mac/mtp_device_delegate_impl_mac.h" 5 #include "chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 device_file_path, local_path, 194 device_file_path, local_path,
195 success_callback, error_callback)); 195 success_callback, error_callback));
196 } 196 }
197 197
198 bool MTPDeviceDelegateImplMac::IsStreaming() { 198 bool MTPDeviceDelegateImplMac::IsStreaming() {
199 return false; 199 return false;
200 } 200 }
201 201
202 void MTPDeviceDelegateImplMac::ReadBytes( 202 void MTPDeviceDelegateImplMac::ReadBytes(
203 const base::FilePath& device_file_path, 203 const base::FilePath& device_file_path,
204 net::IOBuffer* buf, int64 offset, int buf_len, 204 const scoped_refptr<net::IOBuffer>& buf,
205 int64 offset,
206 int buf_len,
205 const ReadBytesSuccessCallback& success_callback, 207 const ReadBytesSuccessCallback& success_callback,
206 const ErrorCallback& error_callback) { 208 const ErrorCallback& error_callback) {
207 NOTREACHED(); 209 NOTREACHED();
208 } 210 }
209 211
210 void MTPDeviceDelegateImplMac::CancelPendingTasksAndDeleteDelegate() { 212 void MTPDeviceDelegateImplMac::CancelPendingTasksAndDeleteDelegate() {
211 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 213 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
212 base::Bind(&MTPDeviceDelegateImplMac::CancelAndDelete, 214 base::Bind(&MTPDeviceDelegateImplMac::CancelAndDelete,
213 base::Unretained(this))); 215 base::Unretained(this)));
214 } 216 }
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 std::string device_name = base::FilePath(device_location).BaseName().value(); 484 std::string device_name = base::FilePath(device_location).BaseName().value();
483 std::string device_id; 485 std::string device_id;
484 storage_monitor::StorageInfo::Type type; 486 storage_monitor::StorageInfo::Type type;
485 bool cracked = storage_monitor::StorageInfo::CrackDeviceId( 487 bool cracked = storage_monitor::StorageInfo::CrackDeviceId(
486 device_name, &type, &device_id); 488 device_name, &type, &device_id);
487 DCHECK(cracked); 489 DCHECK(cracked);
488 DCHECK_EQ(storage_monitor::StorageInfo::MAC_IMAGE_CAPTURE, type); 490 DCHECK_EQ(storage_monitor::StorageInfo::MAC_IMAGE_CAPTURE, type);
489 491
490 cb.Run(new MTPDeviceDelegateImplMac(device_id, device_location)); 492 cb.Run(new MTPDeviceDelegateImplMac(device_id, device_location));
491 } 493 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698