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 | 12 |
13 #include <limits> | 13 #include <limits> |
14 #include <list> | 14 #include <list> |
15 | 15 |
16 #include "base/bind.h" | 16 #include "base/bind.h" |
| 17 #include "base/macros.h" |
17 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
18 #include "base/process/kill.h" | 19 #include "base/process/kill.h" |
19 #include "base/process/launch.h" | 20 #include "base/process/launch.h" |
20 #include "base/process/process.h" | 21 #include "base/process/process.h" |
21 #include "base/stl_util.h" | 22 #include "base/stl_util.h" |
22 #include "base/strings/string_number_conversions.h" | 23 #include "base/strings/string_number_conversions.h" |
23 #include "base/strings/string_util.h" | 24 #include "base/strings/string_util.h" |
24 #include "base/strings/utf_string_conversions.h" | 25 #include "base/strings/utf_string_conversions.h" |
25 #include "components/storage_monitor/media_storage_util.h" | 26 #include "components/storage_monitor/media_storage_util.h" |
26 #include "components/storage_monitor/media_transfer_protocol_device_observer_lin
ux.h" | 27 #include "components/storage_monitor/media_transfer_protocol_device_observer_lin
ux.h" |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 mount_priority_map_[mount_device][mount_point] = removable; | 503 mount_priority_map_[mount_device][mount_point] = removable; |
503 receiver()->ProcessAttach(*storage_info); | 504 receiver()->ProcessAttach(*storage_info); |
504 } | 505 } |
505 | 506 |
506 StorageMonitor* StorageMonitor::CreateInternal() { | 507 StorageMonitor* StorageMonitor::CreateInternal() { |
507 const base::FilePath kDefaultMtabPath("/etc/mtab"); | 508 const base::FilePath kDefaultMtabPath("/etc/mtab"); |
508 return new StorageMonitorLinux(kDefaultMtabPath); | 509 return new StorageMonitorLinux(kDefaultMtabPath); |
509 } | 510 } |
510 | 511 |
511 } // namespace storage_monitor | 512 } // namespace storage_monitor |
OLD | NEW |