Chromium Code Reviews| Index: chrome/browser/storage_monitor/storage_monitor_chromeos.cc |
| diff --git a/chrome/browser/storage_monitor/removable_device_notifications_chromeos.cc b/chrome/browser/storage_monitor/storage_monitor_chromeos.cc |
| similarity index 88% |
| rename from chrome/browser/storage_monitor/removable_device_notifications_chromeos.cc |
| rename to chrome/browser/storage_monitor/storage_monitor_chromeos.cc |
| index 9847fc5b1f43fe62aea382b0f596d91c3d354489..37e7d5108bbf09daaea0d17db8aa91487df321a9 100644 |
| --- a/chrome/browser/storage_monitor/removable_device_notifications_chromeos.cc |
| +++ b/chrome/browser/storage_monitor/storage_monitor_chromeos.cc |
| @@ -2,9 +2,9 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -// chromeos::RemovableDeviceNotificationsCros implementation. |
| +// chromeos::StorageMonitorCros implementation. |
| -#include "chrome/browser/storage_monitor/removable_device_notifications_chromeos.h" |
| +#include "chrome/browser/storage_monitor/storage_monitor_chromeos.h" |
| #include "base/files/file_path.h" |
| #include "base/logging.h" |
| @@ -86,20 +86,20 @@ bool GetDeviceInfo(const std::string& source_path, |
| using content::BrowserThread; |
| -RemovableDeviceNotificationsCros::RemovableDeviceNotificationsCros() { |
| +StorageMonitorCros::StorageMonitorCros() { |
| DCHECK(disks::DiskMountManager::GetInstance()); |
| disks::DiskMountManager::GetInstance()->AddObserver(this); |
| CheckExistingMountPointsOnUIThread(); |
| } |
| -RemovableDeviceNotificationsCros::~RemovableDeviceNotificationsCros() { |
| +StorageMonitorCros::~StorageMonitorCros() { |
| disks::DiskMountManager* manager = disks::DiskMountManager::GetInstance(); |
| if (manager) { |
| manager->RemoveObserver(this); |
| } |
| } |
| -void RemovableDeviceNotificationsCros::CheckExistingMountPointsOnUIThread() { |
| +void StorageMonitorCros::CheckExistingMountPointsOnUIThread() { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| const disks::DiskMountManager::MountPointMap& mount_point_map = |
| disks::DiskMountManager::GetInstance()->mount_points(); |
| @@ -108,22 +108,22 @@ void RemovableDeviceNotificationsCros::CheckExistingMountPointsOnUIThread() { |
| BrowserThread::PostTask( |
| BrowserThread::FILE, FROM_HERE, |
| base::Bind( |
|
vandebo (ex-Chrome)
2013/03/02 00:23:37
nit: line wrap.
|
| - &RemovableDeviceNotificationsCros::CheckMountedPathOnFileThread, |
| + &StorageMonitorCros::CheckMountedPathOnFileThread, |
| this, it->second)); |
| } |
| } |
| -void RemovableDeviceNotificationsCros::OnDiskEvent( |
| +void StorageMonitorCros::OnDiskEvent( |
| disks::DiskMountManager::DiskEvent event, |
| const disks::DiskMountManager::Disk* disk) { |
| } |
| -void RemovableDeviceNotificationsCros::OnDeviceEvent( |
| +void StorageMonitorCros::OnDeviceEvent( |
| disks::DiskMountManager::DeviceEvent event, |
| const std::string& device_path) { |
| } |
| -void RemovableDeviceNotificationsCros::OnMountEvent( |
| +void StorageMonitorCros::OnMountEvent( |
| disks::DiskMountManager::MountEvent event, |
| MountError error_code, |
| const disks::DiskMountManager::MountPointInfo& mount_info) { |
| @@ -148,7 +148,7 @@ void RemovableDeviceNotificationsCros::OnMountEvent( |
| BrowserThread::PostTask( |
| BrowserThread::FILE, FROM_HERE, |
| base::Bind( |
| - &RemovableDeviceNotificationsCros::CheckMountedPathOnFileThread, |
| + &StorageMonitorCros::CheckMountedPathOnFileThread, |
|
vandebo (ex-Chrome)
2013/03/02 00:23:37
nit: line wrap.
|
| this, mount_info)); |
| break; |
| } |
| @@ -163,13 +163,13 @@ void RemovableDeviceNotificationsCros::OnMountEvent( |
| } |
| } |
| -void RemovableDeviceNotificationsCros::OnFormatEvent( |
| +void StorageMonitorCros::OnFormatEvent( |
| disks::DiskMountManager::FormatEvent event, |
| FormatError error_code, |
| const std::string& device_path) { |
| } |
| -bool RemovableDeviceNotificationsCros::GetStorageInfoForPath( |
| +bool StorageMonitorCros::GetStorageInfoForPath( |
| const base::FilePath& path, |
| StorageInfo* device_info) const { |
| if (!path.IsAbsolute()) |
| @@ -190,14 +190,14 @@ bool RemovableDeviceNotificationsCros::GetStorageInfoForPath( |
| return true; |
| } |
| -uint64 RemovableDeviceNotificationsCros::GetStorageSize( |
| +uint64 StorageMonitorCros::GetStorageSize( |
| const std::string& device_location) const { |
| MountMap::const_iterator info_it = mount_map_.find(device_location); |
| return (info_it != mount_map_.end()) ? |
| info_it->second.storage_size_in_bytes : 0; |
| } |
| -void RemovableDeviceNotificationsCros::CheckMountedPathOnFileThread( |
| +void StorageMonitorCros::CheckMountedPathOnFileThread( |
| const disks::DiskMountManager::MountPointInfo& mount_info) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| @@ -205,11 +205,11 @@ void RemovableDeviceNotificationsCros::CheckMountedPathOnFileThread( |
| BrowserThread::PostTask( |
| BrowserThread::UI, FROM_HERE, |
| - base::Bind(&RemovableDeviceNotificationsCros::AddMountedPathOnUIThread, |
| + base::Bind(&StorageMonitorCros::AddMountedPathOnUIThread, |
| this, mount_info, has_dcim)); |
|
vandebo (ex-Chrome)
2013/03/02 00:23:37
'this,' will fit on the previous line
|
| } |
| -void RemovableDeviceNotificationsCros::AddMountedPathOnUIThread( |
| +void StorageMonitorCros::AddMountedPathOnUIThread( |
| const disks::DiskMountManager::MountPointInfo& mount_info, bool has_dcim) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |