Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(793)

Unified Diff: chrome/browser/storage_monitor/storage_monitor_chromeos.cc

Issue 23727009: Cleanup: Remove chrome namespace for storage monitor and media galleries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/storage_monitor/storage_monitor_chromeos.cc
diff --git a/chrome/browser/storage_monitor/storage_monitor_chromeos.cc b/chrome/browser/storage_monitor/storage_monitor_chromeos.cc
index f8a99fcc33ca60f87053e328249d6cce33d0cb5f..8a9fd602a2e6e9147356b363f455c260137f0a84 100644
--- a/chrome/browser/storage_monitor/storage_monitor_chromeos.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_chromeos.cc
@@ -28,7 +28,7 @@ namespace {
std::string MakeDeviceUniqueId(const disks::DiskMountManager::Disk& disk) {
std::string uuid = disk.fs_uuid();
if (!uuid.empty())
- return chrome::kFSUniqueIdPrefix + uuid;
+ return kFSUniqueIdPrefix + uuid;
// If one of the vendor or product information is missing, its value in the
// string is empty.
@@ -39,14 +39,14 @@ std::string MakeDeviceUniqueId(const disks::DiskMountManager::Disk& disk) {
const std::string& product = disk.product_id();
if (vendor.empty() && product.empty())
return std::string();
- return chrome::kVendorModelSerialPrefix + vendor + ":" + product + ":";
+ return kVendorModelSerialPrefix + vendor + ":" + product + ":";
}
// Returns true if the requested device is valid, else false. On success, fills
// in |info|.
bool GetDeviceInfo(const disks::DiskMountManager::MountPointInfo& mount_info,
bool has_dcim,
- chrome::StorageInfo* info) {
+ StorageInfo* info) {
DCHECK(info);
std::string source_path = mount_info.source_path;
@@ -59,17 +59,16 @@ bool GetDeviceInfo(const disks::DiskMountManager::MountPointInfo& mount_info,
// Keep track of device uuid and label, to see how often we receive empty
// values.
string16 device_label = UTF8ToUTF16(disk->device_label());
- chrome::MediaStorageUtil::RecordDeviceInfoHistogram(true, unique_id,
- device_label);
+ MediaStorageUtil::RecordDeviceInfoHistogram(true, unique_id, device_label);
if (unique_id.empty())
return false;
- chrome::StorageInfo::Type type = has_dcim ?
- chrome::StorageInfo::REMOVABLE_MASS_STORAGE_WITH_DCIM :
- chrome::StorageInfo::REMOVABLE_MASS_STORAGE_NO_DCIM;
+ StorageInfo::Type type = has_dcim ?
+ StorageInfo::REMOVABLE_MASS_STORAGE_WITH_DCIM :
+ StorageInfo::REMOVABLE_MASS_STORAGE_NO_DCIM;
- *info = chrome::StorageInfo(
- chrome::StorageInfo::MakeDeviceId(type, unique_id),
+ *info = StorageInfo(
+ StorageInfo::MakeDeviceId(type, unique_id),
vandebo (ex-Chrome) 2013/09/12 20:37:23 nit: this could go up to the previous line, with i
Lei Zhang 2013/09/12 20:40:06 Done.
string16(),
mount_info.mount_path,
device_label,
@@ -83,14 +82,12 @@ bool GetDeviceInfo(const disks::DiskMountManager::MountPointInfo& mount_info,
bool CheckMountedPathOnFileThread(
const disks::DiskMountManager::MountPointInfo& mount_info) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
- return chrome::MediaStorageUtil::HasDcim(
- base::FilePath(mount_info.mount_path));
+ return MediaStorageUtil::HasDcim(base::FilePath(mount_info.mount_path));
}
} // namespace
using content::BrowserThread;
-using chrome::StorageInfo;
StorageMonitorCros::StorageMonitorCros()
: weak_ptr_factory_(this) {
@@ -115,7 +112,7 @@ void StorageMonitorCros::Init() {
}
media_transfer_protocol_device_observer_.reset(
- new chrome::MediaTransferProtocolDeviceObserverLinux(
+ new MediaTransferProtocolDeviceObserverLinux(
receiver(), media_transfer_protocol_manager_.get()));
}
@@ -236,12 +233,12 @@ bool StorageMonitorCros::GetStorageInfoForPath(
// Callback executed when the unmount call is run by DiskMountManager.
// Forwards result to |EjectDevice| caller.
void NotifyUnmountResult(
- base::Callback<void(chrome::StorageMonitor::EjectStatus)> callback,
+ base::Callback<void(StorageMonitor::EjectStatus)> callback,
chromeos::MountError error_code) {
if (error_code == MOUNT_ERROR_NONE)
- callback.Run(chrome::StorageMonitor::EJECT_OK);
+ callback.Run(StorageMonitor::EJECT_OK);
else
- callback.Run(chrome::StorageMonitor::EJECT_FAILURE);
+ callback.Run(StorageMonitor::EJECT_FAILURE);
}
void StorageMonitorCros::EjectDevice(
@@ -297,7 +294,7 @@ void StorageMonitorCros::AddMountedPath(
}
// Get the media device uuid and label if exists.
- chrome::StorageInfo info;
+ StorageInfo info;
if (!GetDeviceInfo(mount_info, has_dcim, &info))
return;
@@ -311,10 +308,6 @@ void StorageMonitorCros::AddMountedPath(
} // namespace chromeos
-namespace chrome {
-
StorageMonitor* StorageMonitor::Create() {
return new chromeos::StorageMonitorCros();
}
-
-} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698