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

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

Issue 14247034: Move Media Galleries FileAPI code out of webkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cr-14352004
Patch Set: Add android ifdef. Created 7 years, 8 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 "base/memory/scoped_nsobject.h" 7 #include "base/memory/scoped_nsobject.h"
8 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
9 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h" 9 #include "chrome/browser/media_galleries/mtp_device_delegate_impl.h"
10 #include "chrome/browser/storage_monitor/image_capture_device.h" 10 #include "chrome/browser/storage_monitor/image_capture_device.h"
11 #include "chrome/browser/storage_monitor/image_capture_device_manager.h" 11 #include "chrome/browser/storage_monitor/image_capture_device_manager.h"
12 #include "chrome/browser/storage_monitor/media_storage_util.h" 12 #include "chrome/browser/storage_monitor/media_storage_util.h"
13 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
14 #include "webkit/fileapi/async_file_util.h" 14 #include "webkit/fileapi/async_file_util.h"
15 15
16 namespace chrome { 16 namespace chrome {
17 17
18 namespace { 18 namespace {
19 19
20 int kReadDirectoryTimeLimitSeconds = 20; 20 int kReadDirectoryTimeLimitSeconds = 20;
21 21
22 using fileapi::MTPDeviceAsyncDelegate;
23 typedef MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback 22 typedef MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback
24 CreateSnapshotFileSuccessCallback; 23 CreateSnapshotFileSuccessCallback;
25 typedef MTPDeviceAsyncDelegate::ErrorCallback ErrorCallback; 24 typedef MTPDeviceAsyncDelegate::ErrorCallback ErrorCallback;
26 typedef MTPDeviceAsyncDelegate::GetFileInfoSuccessCallback 25 typedef MTPDeviceAsyncDelegate::GetFileInfoSuccessCallback
27 GetFileInfoSuccessCallback; 26 GetFileInfoSuccessCallback;
28 typedef MTPDeviceAsyncDelegate::ReadDirectorySuccessCallback 27 typedef MTPDeviceAsyncDelegate::ReadDirectorySuccessCallback
29 ReadDirectorySuccessCallback; 28 ReadDirectorySuccessCallback;
30 29
31 } // namespace 30 } // namespace
32 31
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 bool cracked = MediaStorageUtil::CrackDeviceId(device_name, 407 bool cracked = MediaStorageUtil::CrackDeviceId(device_name,
409 &type, &device_id); 408 &type, &device_id);
410 DCHECK(cracked); 409 DCHECK(cracked);
411 DCHECK_EQ(MediaStorageUtil::MAC_IMAGE_CAPTURE, type); 410 DCHECK_EQ(MediaStorageUtil::MAC_IMAGE_CAPTURE, type);
412 411
413 cb.Run(new MTPDeviceDelegateImplMac(device_id, device_location)); 412 cb.Run(new MTPDeviceDelegateImplMac(device_id, device_location));
414 } 413 }
415 414
416 } // namespace chrome 415 } // namespace chrome
417 416
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698