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..bd272dbf5a3b38e6f4387738aae56bc3450707df 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,18 +1247,18 @@ 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 *cros_disks_client = |
+ chromeos::DBusThreadManager::Get()->GetCrosDisksClient(); |
chromeos::MountType mount_type = |
- mount_lib->MountTypeFromString(mount_type_str); |
+ cros_disks_client->MountTypeFromString(mount_type_str); |
if (mount_type == chromeos::MOUNT_TYPE_INVALID) { |
error_ = "Invalid mount type"; |
SendResponse(false); |
return; |
} |
- mount_lib->MountPath(source_file.data(), mount_type, options); |
+ cros_disks_client->MountPath(source_file.data(), mount_type, options); |
#endif |
SendResponse(true); |
@@ -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 = |
- mount_lib->mount_points(); |
+ chromeos::CrosDisksClient *cros_disks_client = |
+ chromeos::DBusThreadManager::Get()->GetCrosDisksClient(); |
+ chromeos::CrosDisksClient::MountPointMap mount_points = |
+ cros_disks_client->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 = |
- mount_lib->disks().find(volume_device_path); |
+ chromeos::CrosDisksClient* cros_disks_client = |
+ chromeos::DBusThreadManager::Get()->GetCrosDisksClient(); |
+ chromeos::CrosDisksClient::DiskMap::const_iterator volume_it = |
+ cros_disks_client->disks().find(volume_device_path); |
- if (volume_it != mount_lib->disks().end() && |
+ if (volume_it != cros_disks_client->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. |