| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/storage_monitor/storage_monitor_mac.h" | 5 #include "components/storage_monitor/storage_monitor_mac.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 DARegisterDiskDescriptionChangedCallback( | 194 DARegisterDiskDescriptionChangedCallback( |
| 195 session_, | 195 session_, |
| 196 kDADiskDescriptionMatchVolumeMountable, | 196 kDADiskDescriptionMatchVolumeMountable, |
| 197 kDADiskDescriptionWatchVolumePath, | 197 kDADiskDescriptionWatchVolumePath, |
| 198 DiskDescriptionChangedCallback, | 198 DiskDescriptionChangedCallback, |
| 199 this); | 199 this); |
| 200 | 200 |
| 201 DASessionScheduleWithRunLoop( | 201 DASessionScheduleWithRunLoop( |
| 202 session_, CFRunLoopGetCurrent(), kCFRunLoopCommonModes); | 202 session_, CFRunLoopGetCurrent(), kCFRunLoopCommonModes); |
| 203 | 203 |
| 204 if (base::mac::IsOSLionOrLater()) { | 204 image_capture_device_manager_.reset(new ImageCaptureDeviceManager); |
| 205 image_capture_device_manager_.reset(new ImageCaptureDeviceManager); | 205 image_capture_device_manager_->SetNotifications(receiver()); |
| 206 image_capture_device_manager_->SetNotifications(receiver()); | |
| 207 } | |
| 208 } | 206 } |
| 209 | 207 |
| 210 void StorageMonitorMac::UpdateDisk( | 208 void StorageMonitorMac::UpdateDisk( |
| 211 const std::string& bsd_name, | 209 const std::string& bsd_name, |
| 212 const StorageInfo& info, | 210 const StorageInfo& info, |
| 213 UpdateType update_type) { | 211 UpdateType update_type) { |
| 214 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 212 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 215 | 213 |
| 216 pending_disk_updates_--; | 214 pending_disk_updates_--; |
| 217 bool initialization_complete = false; | 215 bool initialization_complete = false; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 } | 382 } |
| 385 } | 383 } |
| 386 return false; | 384 return false; |
| 387 } | 385 } |
| 388 | 386 |
| 389 StorageMonitor* StorageMonitor::CreateInternal() { | 387 StorageMonitor* StorageMonitor::CreateInternal() { |
| 390 return new StorageMonitorMac(); | 388 return new StorageMonitorMac(); |
| 391 } | 389 } |
| 392 | 390 |
| 393 } // namespace storage_monitor | 391 } // namespace storage_monitor |
| OLD | NEW |