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

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

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 <stddef.h>
8
7 #include <algorithm> 9 #include <algorithm>
8 10
9 #include "base/mac/scoped_nsobject.h" 11 #include "base/mac/scoped_nsobject.h"
12 #include "base/macros.h"
10 #include "base/threading/sequenced_worker_pool.h" 13 #include "base/threading/sequenced_worker_pool.h"
11 #include "components/storage_monitor/image_capture_device.h" 14 #include "components/storage_monitor/image_capture_device.h"
12 #include "components/storage_monitor/image_capture_device_manager.h" 15 #include "components/storage_monitor/image_capture_device_manager.h"
13 #include "content/public/browser/browser_thread.h" 16 #include "content/public/browser/browser_thread.h"
14 #include "storage/browser/fileapi/async_file_util.h" 17 #include "storage/browser/fileapi/async_file_util.h"
15 18
16 namespace { 19 namespace {
17 20
18 int kReadDirectoryTimeLimitSeconds = 20; 21 int kReadDirectoryTimeLimitSeconds = 20;
19 22
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 success_callback, error_callback)); 207 success_callback, error_callback));
205 } 208 }
206 209
207 bool MTPDeviceDelegateImplMac::IsStreaming() { 210 bool MTPDeviceDelegateImplMac::IsStreaming() {
208 return false; 211 return false;
209 } 212 }
210 213
211 void MTPDeviceDelegateImplMac::ReadBytes( 214 void MTPDeviceDelegateImplMac::ReadBytes(
212 const base::FilePath& device_file_path, 215 const base::FilePath& device_file_path,
213 const scoped_refptr<net::IOBuffer>& buf, 216 const scoped_refptr<net::IOBuffer>& buf,
214 int64 offset, 217 int64_t offset,
215 int buf_len, 218 int buf_len,
216 const ReadBytesSuccessCallback& success_callback, 219 const ReadBytesSuccessCallback& success_callback,
217 const ErrorCallback& error_callback) { 220 const ErrorCallback& error_callback) {
218 NOTREACHED(); 221 NOTREACHED();
219 } 222 }
220 223
221 bool MTPDeviceDelegateImplMac::IsReadOnly() const { 224 bool MTPDeviceDelegateImplMac::IsReadOnly() const {
222 return true; 225 return true;
223 } 226 }
224 227
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 std::string device_name = base::FilePath(device_location).BaseName().value(); 563 std::string device_name = base::FilePath(device_location).BaseName().value();
561 std::string device_id; 564 std::string device_id;
562 storage_monitor::StorageInfo::Type type; 565 storage_monitor::StorageInfo::Type type;
563 bool cracked = storage_monitor::StorageInfo::CrackDeviceId( 566 bool cracked = storage_monitor::StorageInfo::CrackDeviceId(
564 device_name, &type, &device_id); 567 device_name, &type, &device_id);
565 DCHECK(cracked); 568 DCHECK(cracked);
566 DCHECK_EQ(storage_monitor::StorageInfo::MAC_IMAGE_CAPTURE, type); 569 DCHECK_EQ(storage_monitor::StorageInfo::MAC_IMAGE_CAPTURE, type);
567 570
568 cb.Run(new MTPDeviceDelegateImplMac(device_id, device_location)); 571 cb.Run(new MTPDeviceDelegateImplMac(device_id, device_location));
569 } 572 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698