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

Side by Side Diff: chrome/browser/storage_monitor/image_capture_device_manager.mm

Issue 13077003: [Media Galleries] Ignore Mac PTP volumes mounted with mass storage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/storage_monitor/image_capture_device_manager.h" 5 #include "chrome/browser/storage_monitor/image_capture_device_manager.h"
6 6
7 #import <ImageCaptureCore/ImageCaptureCore.h> 7 #import <ImageCaptureCore/ImageCaptureCore.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #import "chrome/browser/storage_monitor/image_capture_device.h" 10 #import "chrome/browser/storage_monitor/image_capture_device.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 return nil; 83 return nil;
84 } 84 }
85 85
86 - (void)deviceBrowser:(ICDeviceBrowser*)browser 86 - (void)deviceBrowser:(ICDeviceBrowser*)browser
87 didAddDevice:(ICDevice*)addedDevice 87 didAddDevice:(ICDevice*)addedDevice
88 moreComing:(BOOL)moreComing { 88 moreComing:(BOOL)moreComing {
89 if (!(addedDevice.type & ICDeviceTypeCamera)) 89 if (!(addedDevice.type & ICDeviceTypeCamera))
90 return; 90 return;
91 91
92 // Ignore mass storage attaches -- those will be handled
93 // by Mac's removable storage watcher.
94 if ([addedDevice.transportType isEqualToString:ICTransportTypeMassStorage])
95 return;
96
92 ICCameraDevice* cameraDevice = 97 ICCameraDevice* cameraDevice =
93 base::mac::ObjCCastStrict<ICCameraDevice>(addedDevice); 98 base::mac::ObjCCastStrict<ICCameraDevice>(addedDevice);
94 99
95 [cameras_ addObject:addedDevice]; 100 [cameras_ addObject:addedDevice];
96 101
97 // TODO(gbillock): use [cameraDevice mountPoint] here when possible. 102 // TODO(gbillock): use [cameraDevice mountPoint] here when possible.
98 notifications_->ProcessAttach( 103 notifications_->ProcessAttach(
99 chrome::StorageInfo( 104 chrome::StorageInfo(
100 chrome::MediaStorageUtil::MakeDeviceId( 105 chrome::MediaStorageUtil::MakeDeviceId(
101 chrome::MediaStorageUtil::MAC_IMAGE_CAPTURE, 106 chrome::MediaStorageUtil::MAC_IMAGE_CAPTURE,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 ImageCaptureDeviceManagerImpl* manager = 149 ImageCaptureDeviceManagerImpl* manager =
145 g_image_capture_device_manager->device_browser_; 150 g_image_capture_device_manager->device_browser_;
146 return [manager deviceForUUID:uuid]; 151 return [manager deviceForUUID:uuid];
147 } 152 }
148 153
149 id<ICDeviceBrowserDelegate> ImageCaptureDeviceManager::device_browser() { 154 id<ICDeviceBrowserDelegate> ImageCaptureDeviceManager::device_browser() {
150 return device_browser_.get(); 155 return device_browser_.get();
151 } 156 }
152 157
153 } // namespace chrome 158 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698