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

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

Issue 120303003: [StorageMonitor] Move gallery name generation to StorageInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 7 years 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/media_storage_util.cc
diff --git a/chrome/browser/storage_monitor/media_storage_util.cc b/chrome/browser/storage_monitor/media_storage_util.cc
index d51be6d085b3760420deff425b6cbbe281133f40..4e357b6b093a8992c29837d702d4a2b7bd89d2f0 100644
--- a/chrome/browser/storage_monitor/media_storage_util.cc
+++ b/chrome/browser/storage_monitor/media_storage_util.cc
@@ -180,6 +180,17 @@ bool MediaStorageUtil::GetDeviceInfoFromPath(const base::FilePath& path,
return true;
}
+string16 MediaStorageUtil::GetGalleryDisplayNameFromPath(
+ const base::FilePath& absolute_path) {
+ StorageInfo storage_info;
+ base::FilePath relative_path;
+ if (!GetDeviceInfoFromPath(absolute_path, &storage_info, &relative_path))
vandebo (ex-Chrome) 2014/01/08 19:46:25 I think this ends up jumping through more hoops th
Haojian Wu 2014/01/20 09:43:00 Done. I keep this function(just invoke StorageInfo
+ return string16();
+ // Set media gallery absolute path to StorageInfo.
+ storage_info.set_location(absolute_path.value());
+ return storage_info.GetDisplayName();
+}
+
// static
base::FilePath MediaStorageUtil::FindDevicePathById(
const std::string& device_id) {

Powered by Google App Engine
This is Rietveld 408576698