Chromium Code Reviews| Index: chrome/browser/extensions/extension_file_browser_private_api.cc |
| diff --git a/chrome/browser/extensions/extension_file_browser_private_api.cc b/chrome/browser/extensions/extension_file_browser_private_api.cc |
| index f0af322380d8b8b0f4c3d2385d5e1107b5fe0d53..7ca05c05c5fb21231956eff3c4ba32aa44e5abd4 100644 |
| --- a/chrome/browser/extensions/extension_file_browser_private_api.cc |
| +++ b/chrome/browser/extensions/extension_file_browser_private_api.cc |
| @@ -50,7 +50,7 @@ |
| #include "webkit/fileapi/file_system_util.h" |
| #ifdef OS_CHROMEOS |
| -#include "chrome/browser/chromeos/cros/cros_library.h" |
| +#include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| #endif |
| using content::BrowserThread; |
| @@ -266,12 +266,13 @@ void UpdateFileHandlerUsageStats(Profile* profile, const std::string& task_id) { |
| #ifdef OS_CHROMEOS |
| base::DictionaryValue* MountPointToValue(Profile* profile, |
| - const chromeos::MountLibrary::MountPointInfo& mount_point_info) { |
| + const chromeos::CrosDisksClient::MountPointInfo& mount_point_info) { |
| base::DictionaryValue *mount_info = new base::DictionaryValue(); |
| mount_info->SetString("mountType", |
| - chromeos::MountLibrary::MountTypeToString(mount_point_info.mount_type)); |
| + chromeos::CrosDisksClient::MountTypeToString( |
| + mount_point_info.mount_type)); |
| if (mount_point_info.mount_type == chromeos::MOUNT_TYPE_ARCHIVE) { |
| GURL source_url; |
| @@ -295,7 +296,7 @@ base::DictionaryValue* MountPointToValue(Profile* profile, |
| } |
| mount_info->SetString("mountCondition", |
| - chromeos::MountLibrary::MountConditionToString( |
| + chromeos::CrosDisksClient::MountConditionToString( |
| mount_point_info.mount_condition)); |
| return mount_info; |
| @@ -1246,8 +1247,8 @@ void AddMountFunction::GetLocalPathsResponseOnUIThread( |
| const chromeos::MountPathOptions& options = params->mount_options; |
| FilePath::StringType source_file = files[0].value(); |
| - chromeos::MountLibrary *mount_lib = |
| - chromeos::CrosLibrary::Get()->GetMountLibrary(); |
| + chromeos::CrosDisksClient *mount_lib = |
|
satorux1
2011/11/07 23:21:55
mount_lib -> mount_client ?
hashimoto
2011/11/08 07:31:05
Done.
|
| + chromeos::DBusThreadManager::Get()->GetCrosDisksClient(); |
| chromeos::MountType mount_type = |
| mount_lib->MountTypeFromString(mount_type_str); |
| @@ -1300,7 +1301,7 @@ void RemoveMountFunction::GetLocalPathsResponseOnUIThread( |
| return; |
| } |
| #ifdef OS_CHROMEOS |
| - chromeos::CrosLibrary::Get()->GetMountLibrary()->UnmountPath( |
| + chromeos::DBusThreadManager::Get()->GetCrosDisksClient()->UnmountPath( |
| files[0].value().c_str()); |
| #endif |
| @@ -1321,12 +1322,12 @@ bool GetMountPointsFunction::RunImpl() { |
| result_.reset(mounts); |
| #ifdef OS_CHROMEOS |
| - chromeos::MountLibrary *mount_lib = |
| - chromeos::CrosLibrary::Get()->GetMountLibrary(); |
| - chromeos::MountLibrary::MountPointMap mount_points = |
| + chromeos::CrosDisksClient *mount_lib = |
| + chromeos::DBusThreadManager::Get()->GetCrosDisksClient(); |
| + chromeos::CrosDisksClient::MountPointMap mount_points = |
| mount_lib->mount_points(); |
| - for (chromeos::MountLibrary::MountPointMap::const_iterator it = |
| + for (chromeos::CrosDisksClient::MountPointMap::const_iterator it = |
| mount_points.begin(); |
| it != mount_points.end(); |
| ++it) { |
| @@ -1389,8 +1390,8 @@ void GetSizeStatsFunction::CallGetSizeStatsOnFileThread( |
| size_t total_size_kb = 0; |
| size_t remaining_size_kb = 0; |
| #ifdef OS_CHROMEOS |
| - chromeos::CrosLibrary::Get()->GetMountLibrary()->GetSizeStatsOnFileThread( |
| - mount_path, &total_size_kb, &remaining_size_kb); |
| + chromeos::DBusThreadManager::Get()->GetCrosDisksClient()-> |
| + GetSizeStatsOnFileThread(mount_path, &total_size_kb, &remaining_size_kb); |
| #endif |
| BrowserThread::PostTask( |
| @@ -1453,7 +1454,7 @@ void FormatDeviceFunction::GetLocalPathsResponseOnUIThread( |
| } |
| #ifdef OS_CHROMEOS |
| - chromeos::CrosLibrary::Get()->GetMountLibrary()->FormatMountedDevice( |
| + chromeos::DBusThreadManager::Get()->GetCrosDisksClient()->FormatMountedDevice( |
| files[0].value().c_str()); |
| #endif |
| @@ -1478,14 +1479,14 @@ bool GetVolumeMetadataFunction::RunImpl() { |
| } |
| #ifdef OS_CHROMEOS |
| - chromeos::MountLibrary* mount_lib = |
| - chromeos::CrosLibrary::Get()->GetMountLibrary(); |
| - chromeos::MountLibrary::DiskMap::const_iterator volume_it = |
| + chromeos::CrosDisksClient* mount_lib = |
| + chromeos::DBusThreadManager::Get()->GetCrosDisksClient(); |
| + chromeos::CrosDisksClient::DiskMap::const_iterator volume_it = |
| mount_lib->disks().find(volume_device_path); |
| if (volume_it != mount_lib->disks().end() && |
| !volume_it->second->is_hidden()) { |
| - chromeos::MountLibrary::Disk* volume = volume_it->second; |
| + chromeos::CrosDisksClient::Disk* volume = volume_it->second; |
| DictionaryValue* volume_info = new DictionaryValue(); |
| result_.reset(volume_info); |
| // Localising mount path. |