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

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

Issue 12544005: Consolidate storage_monitor/MediaDeviceNotificationsUtils into MediaStorageUtil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac apply patch Created 7 years, 9 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 0f2bae5004fa4b0df65d511f000e4d4ceb26a358..a4a6075ac7c9e11a3943133aebfbd574ca3764b1 100644
--- a/chrome/browser/storage_monitor/storage_monitor_chromeos.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_chromeos.cc
@@ -13,7 +13,6 @@
#include "base/string_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/storage_monitor/media_device_notifications_utils.h"
#include "chrome/browser/storage_monitor/media_storage_util.h"
#include "chrome/browser/storage_monitor/media_transfer_protocol_device_observer_linux.h"
#include "chrome/browser/storage_monitor/removable_device_constants.h"
@@ -54,7 +53,8 @@ string16 GetDeviceName(const disks::DiskMountManager::Disk& disk,
if (!device_label.empty() && IsStringUTF8(device_label))
return UTF8ToUTF16(device_label);
- return chrome::GetFullProductName(disk.vendor_name(), disk.product_name());
+ return chrome::MediaStorageUtil::GetFullProductName(disk.vendor_name(),
+ disk.product_name());
}
// Constructs a device id using uuid or manufacturer (vendor and product) id
@@ -105,6 +105,7 @@ bool GetDeviceInfo(const std::string& source_path,
} // namespace
using content::BrowserThread;
+using chrome::StorageInfo;
StorageMonitorCros::StorageMonitorCros() {
}
@@ -205,7 +206,7 @@ void StorageMonitorCros::OnFormatEvent(
bool StorageMonitorCros::GetStorageInfoForPath(
const base::FilePath& path,
- chrome::StorageInfo* device_info) const {
+ StorageInfo* device_info) const {
if (!path.IsAbsolute())
return false;
@@ -235,7 +236,7 @@ void StorageMonitorCros::CheckMountedPathOnFileThread(
const disks::DiskMountManager::MountPointInfo& mount_info) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- bool has_dcim = chrome::IsMediaDevice(mount_info.mount_path);
+ bool has_dcim = chrome::MediaStorageUtil::HasDcim(mount_info.mount_path);
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
@@ -279,9 +280,11 @@ void StorageMonitorCros::AddMountedPathOnUIThread(
std::string device_id = chrome::MediaStorageUtil::MakeDeviceId(type,
unique_id);
+
chrome::StorageInfo object_info(
device_id,
- chrome::GetDisplayNameForDevice(storage_size_in_bytes, device_label),
+ chrome::MediaStorageUtil::GetDisplayNameForDevice(storage_size_in_bytes,
+ device_label),
mount_info.mount_path,
storage_label,
vendor_name,
« no previous file with comments | « chrome/browser/storage_monitor/media_storage_util_unittest.cc ('k') | chrome/browser/storage_monitor/storage_monitor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698