Chromium Code Reviews| 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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 503 DCHECK(!storage_info->device_id().empty()); | 503 DCHECK(!storage_info->device_id().empty()); |
| 504 | 504 |
| 505 bool removable = StorageInfo::IsRemovableDevice(storage_info->device_id()); | 505 bool removable = StorageInfo::IsRemovableDevice(storage_info->device_id()); |
| 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 if (removable) | 513 receiver()->ProcessAttach(*storage_info); |
|
Hongbo Min
2013/06/04 02:52:29
why do you remove this if clause?
| |
| 514 receiver()->ProcessAttach(*storage_info); | |
| 515 } | 514 } |
| 516 | 515 |
| 517 } // namespace chrome | 516 } // namespace chrome |
| OLD | NEW |