| 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 // RemovableDeviceNotificationsLinux implementation. | 5 // RemovableDeviceNotificationsLinux implementation. |
| 6 | 6 |
| 7 #include "chrome/browser/media_gallery/removable_device_notifications_linux.h" | 7 #include "chrome/browser/system_monitor/removable_device_notifications_linux.h" |
| 8 | 8 |
| 9 #include <libudev.h> | 9 #include <libudev.h> |
| 10 #include <mntent.h> | 10 #include <mntent.h> |
| 11 #include <stdio.h> | 11 #include <stdio.h> |
| 12 | 12 |
| 13 #include <list> | 13 #include <list> |
| 14 | 14 |
| 15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/file_path.h" | 16 #include "base/file_path.h" |
| 17 #include "base/memory/scoped_generic_obj.h" | 17 #include "base/memory/scoped_generic_obj.h" |
| 18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
| 19 #include "base/stl_util.h" | 19 #include "base/stl_util.h" |
| 20 #include "base/string_number_conversions.h" | 20 #include "base/string_number_conversions.h" |
| 21 #include "base/string_util.h" | 21 #include "base/string_util.h" |
| 22 #include "base/stringprintf.h" | 22 #include "base/stringprintf.h" |
| 23 #include "base/system_monitor/system_monitor.h" | 23 #include "base/system_monitor/system_monitor.h" |
| 24 #include "base/utf_string_conversions.h" | 24 #include "base/utf_string_conversions.h" |
| 25 #include "chrome/browser/media_gallery/media_device_notifications_utils.h" | 25 #include "chrome/browser/system_monitor/media_device_notifications_utils.h" |
| 26 #include "chrome/browser/media_gallery/media_gallery_constants.h" | 26 #include "chrome/browser/system_monitor/removable_device_constants.h" |
| 27 #include "chrome/browser/media_gallery/media_storage_util.h" | 27 #include "chrome/browser/system_monitor/media_storage_util.h" |
| 28 | 28 |
| 29 namespace chrome { | 29 namespace chrome { |
| 30 | 30 |
| 31 using base::SystemMonitor; | 31 using base::SystemMonitor; |
| 32 using content::BrowserThread; | 32 using content::BrowserThread; |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 static RemovableDeviceNotificationsLinux* | 36 static RemovableDeviceNotificationsLinux* |
| 37 g_removable_device_notifications_linux = NULL; | 37 g_removable_device_notifications_linux = NULL; |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 mount_info_map_[mount_point] = mount_point_info; | 503 mount_info_map_[mount_point] = mount_point_info; |
| 504 mount_priority_map_[mount_device][mount_point] = removable; | 504 mount_priority_map_[mount_device][mount_point] = removable; |
| 505 | 505 |
| 506 if (removable) { | 506 if (removable) { |
| 507 SystemMonitor::Get()->ProcessRemovableStorageAttached(device_id, name, | 507 SystemMonitor::Get()->ProcessRemovableStorageAttached(device_id, name, |
| 508 mount_point.value()); | 508 mount_point.value()); |
| 509 } | 509 } |
| 510 } | 510 } |
| 511 | 511 |
| 512 } // namespace chrome | 512 } // namespace chrome |
| OLD | NEW |