OLD | NEW |
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/memory/scoped_nsobject.h" | 9 #include "base/memory/scoped_nsobject.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
11 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" | 11 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" |
12 #include "chrome/browser/storage_monitor/image_capture_device.h" | 12 #include "chrome/browser/storage_monitor/image_capture_device.h" |
13 #include "chrome/browser/storage_monitor/image_capture_device_manager.h" | 13 #include "chrome/browser/storage_monitor/image_capture_device_manager.h" |
14 #include "chrome/browser/storage_monitor/media_storage_util.h" | |
15 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
16 #include "webkit/fileapi/async_file_util.h" | 15 #include "webkit/fileapi/async_file_util.h" |
17 | 16 |
18 namespace chrome { | 17 namespace chrome { |
19 | 18 |
20 namespace { | 19 namespace { |
21 | 20 |
22 int kReadDirectoryTimeLimitSeconds = 20; | 21 int kReadDirectoryTimeLimitSeconds = 20; |
23 | 22 |
24 typedef MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback | 23 typedef MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 StorageInfo::Type type; | 474 StorageInfo::Type type; |
476 bool cracked = StorageInfo::CrackDeviceId(device_name, &type, &device_id); | 475 bool cracked = StorageInfo::CrackDeviceId(device_name, &type, &device_id); |
477 DCHECK(cracked); | 476 DCHECK(cracked); |
478 DCHECK_EQ(StorageInfo::MAC_IMAGE_CAPTURE, type); | 477 DCHECK_EQ(StorageInfo::MAC_IMAGE_CAPTURE, type); |
479 | 478 |
480 cb.Run(new MTPDeviceDelegateImplMac(device_id, device_location)); | 479 cb.Run(new MTPDeviceDelegateImplMac(device_id, device_location)); |
481 } | 480 } |
482 | 481 |
483 } // namespace chrome | 482 } // namespace chrome |
484 | 483 |
OLD | NEW |