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

Unified Diff: chrome/browser/storage_monitor/disk_info_mac.mm

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/disk_info_mac.mm
diff --git a/chrome/browser/storage_monitor/disk_info_mac.mm b/chrome/browser/storage_monitor/disk_info_mac.mm
index e10021e6a049727a1b9763586009cb25aab5178a..7635f8df557ae989a744226ff873f4d112c81885 100644
--- a/chrome/browser/storage_monitor/disk_info_mac.mm
+++ b/chrome/browser/storage_monitor/disk_info_mac.mm
@@ -7,7 +7,6 @@
#include "base/mac/foundation_util.h"
#include "base/sys_string_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 "content/public/browser/browser_thread.h"
@@ -78,8 +77,9 @@ DiskInfoMac DiskInfoMac::BuildDiskInfoOnFileThread(CFDictionaryRef dict) {
if (!volume_name.empty()) {
info.device_name_ = volume_name;
} else {
- info.device_name_ = GetFullProductName(UTF16ToUTF8(vendor_name),
- UTF16ToUTF8(model_name));
+ info.device_name_ = MediaStorageUtil::GetFullProductName(
+ UTF16ToUTF8(vendor_name),
+ UTF16ToUTF8(model_name));
}
info.model_name_ = UTF16ToUTF8(model_name);
@@ -106,7 +106,8 @@ DiskInfoMac DiskInfoMac::BuildDiskInfoOnFileThread(CFDictionaryRef dict) {
dict, kDADiskDescriptionMediaRemovableKey);
bool is_removable = is_removable_ref && CFBooleanGetValue(is_removable_ref);
// Checking for DCIM only matters on removable devices.
- bool has_dcim = is_removable && IsMediaDevice(info.mount_point_.value());
+ bool has_dcim =
+ is_removable && MediaStorageUtil::HasDcim(info.mount_point_.value());
info.type_ = GetDeviceType(is_removable, has_dcim);
if (!unique_id.empty())
info.device_id_ = MediaStorageUtil::MakeDeviceId(info.type_, unique_id);

Powered by Google App Engine
This is Rietveld 408576698