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 // StorageMonitorLinux implementation. | 5 // StorageMonitorLinux implementation. |
6 | 6 |
7 #include "chrome/browser/storage_monitor/storage_monitor_linux.h" | 7 #include "chrome/browser/storage_monitor/storage_monitor_linux.h" |
8 | 8 |
9 #include <mntent.h> | 9 #include <mntent.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 const base::FilePath mount_point(storage_info->location()); | 506 const base::FilePath mount_point(storage_info->location()); |
507 | 507 |
508 MountPointInfo mount_point_info; | 508 MountPointInfo mount_point_info; |
509 mount_point_info.mount_device = mount_device; | 509 mount_point_info.mount_device = mount_device; |
510 mount_point_info.storage_info = *storage_info; | 510 mount_point_info.storage_info = *storage_info; |
511 mount_info_map_[mount_point] = mount_point_info; | 511 mount_info_map_[mount_point] = mount_point_info; |
512 mount_priority_map_[mount_device][mount_point] = removable; | 512 mount_priority_map_[mount_device][mount_point] = removable; |
513 receiver()->ProcessAttach(*storage_info); | 513 receiver()->ProcessAttach(*storage_info); |
514 } | 514 } |
515 | 515 |
| 516 StorageMonitor* StorageMonitor::Create() { |
| 517 const base::FilePath kDefaultMtabPath("/etc/mtab"); |
| 518 return new StorageMonitorLinux(kDefaultMtabPath); |
| 519 } |
| 520 |
516 } // namespace chrome | 521 } // namespace chrome |
OLD | NEW |