| 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" |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 if (read_path < file_paths_[i].DirName()) | 372 if (read_path < file_paths_[i].DirName()) |
| 373 break; | 373 break; |
| 374 continue; | 374 continue; |
| 375 } | 375 } |
| 376 if (file_paths_[i].DirName() != read_path) | 376 if (file_paths_[i].DirName() != read_path) |
| 377 continue; | 377 continue; |
| 378 | 378 |
| 379 base::FilePath relative_path; | 379 base::FilePath relative_path; |
| 380 read_path.AppendRelativePath(file_paths_[i], &relative_path); | 380 read_path.AppendRelativePath(file_paths_[i], &relative_path); |
| 381 base::PlatformFileInfo info = file_info_[file_paths_[i].value()]; | 381 base::PlatformFileInfo info = file_info_[file_paths_[i].value()]; |
| 382 base::FileUtilProxy::Entry entry; | 382 fileapi::DirectoryEntry entry; |
| 383 entry.name = relative_path.value(); | 383 entry.name = relative_path.value(); |
| 384 entry.is_directory = info.is_directory; | 384 entry.is_directory = info.is_directory; |
| 385 entry.size = info.size; | 385 entry.size = info.size; |
| 386 entry.last_modified_time = info.last_modified; | 386 entry.last_modified_time = info.last_modified; |
| 387 entry_list.push_back(entry); | 387 entry_list.push_back(entry); |
| 388 } | 388 } |
| 389 | 389 |
| 390 if (found_path) { | 390 if (found_path) { |
| 391 content::BrowserThread::PostTask(content::BrowserThread::IO, | 391 content::BrowserThread::PostTask(content::BrowserThread::IO, |
| 392 FROM_HERE, | 392 FROM_HERE, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 StorageInfo::Type type; | 475 StorageInfo::Type type; |
| 476 bool cracked = StorageInfo::CrackDeviceId(device_name, &type, &device_id); | 476 bool cracked = StorageInfo::CrackDeviceId(device_name, &type, &device_id); |
| 477 DCHECK(cracked); | 477 DCHECK(cracked); |
| 478 DCHECK_EQ(StorageInfo::MAC_IMAGE_CAPTURE, type); | 478 DCHECK_EQ(StorageInfo::MAC_IMAGE_CAPTURE, type); |
| 479 | 479 |
| 480 cb.Run(new MTPDeviceDelegateImplMac(device_id, device_location)); | 480 cb.Run(new MTPDeviceDelegateImplMac(device_id, device_location)); |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace chrome | 483 } // namespace chrome |
| 484 | 484 |
| OLD | NEW |