| 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 // StorageMonitorLinux implementation. | 5 // StorageMonitorLinux implementation. |
| 6 | 6 |
| 7 #include "components/storage_monitor/storage_monitor_linux.h" | 7 #include "components/storage_monitor/storage_monitor_linux.h" |
| 8 | 8 |
| 9 #include <mntent.h> | 9 #include <mntent.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| 11 #include <stdio.h> | 11 #include <stdio.h> |
| 12 #include <limits> | 12 #include <limits> |
| 13 #include <list> | 13 #include <list> |
| 14 #include <utility> | 14 #include <utility> |
| 15 | 15 |
| 16 #include "base/bind.h" | 16 #include "base/bind.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram_macros.h" |
| 19 #include "base/process/kill.h" | 19 #include "base/process/kill.h" |
| 20 #include "base/process/launch.h" | 20 #include "base/process/launch.h" |
| 21 #include "base/process/process.h" | 21 #include "base/process/process.h" |
| 22 #include "base/stl_util.h" | 22 #include "base/stl_util.h" |
| 23 #include "base/strings/string_number_conversions.h" | 23 #include "base/strings/string_number_conversions.h" |
| 24 #include "base/strings/string_util.h" | 24 #include "base/strings/string_util.h" |
| 25 #include "base/strings/utf_string_conversions.h" | 25 #include "base/strings/utf_string_conversions.h" |
| 26 #include "components/storage_monitor/media_storage_util.h" | 26 #include "components/storage_monitor/media_storage_util.h" |
| 27 #include "components/storage_monitor/removable_device_constants.h" | 27 #include "components/storage_monitor/removable_device_constants.h" |
| 28 #include "components/storage_monitor/storage_info.h" | 28 #include "components/storage_monitor/storage_info.h" |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 mount_priority_map_[mount_device][mount_point] = removable; | 472 mount_priority_map_[mount_device][mount_point] = removable; |
| 473 receiver()->ProcessAttach(*storage_info); | 473 receiver()->ProcessAttach(*storage_info); |
| 474 } | 474 } |
| 475 | 475 |
| 476 StorageMonitor* StorageMonitor::CreateInternal() { | 476 StorageMonitor* StorageMonitor::CreateInternal() { |
| 477 const base::FilePath kDefaultMtabPath("/etc/mtab"); | 477 const base::FilePath kDefaultMtabPath("/etc/mtab"); |
| 478 return new StorageMonitorLinux(kDefaultMtabPath); | 478 return new StorageMonitorLinux(kDefaultMtabPath); |
| 479 } | 479 } |
| 480 | 480 |
| 481 } // namespace storage_monitor | 481 } // namespace storage_monitor |
| OLD | NEW |