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

Unified Diff: chrome/browser/media_gallery/media_file_system_registry.cc

Issue 10827057: Plumb file system name down from MediaFileSystemRegistry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/media_gallery/media_file_system_registry.cc
diff --git a/chrome/browser/media_gallery/media_file_system_registry.cc b/chrome/browser/media_gallery/media_file_system_registry.cc
index 70cd3613f15ae13b5ca00230b3ece28cdfbf13f7..56a8f183a371f7db52d3d2a1b30efb2267faec83 100644
--- a/chrome/browser/media_gallery/media_file_system_registry.cc
+++ b/chrome/browser/media_gallery/media_file_system_registry.cc
@@ -55,13 +55,13 @@ MediaFileSystemRegistry* MediaFileSystemRegistry::GetInstance() {
return g_media_file_system_registry.Pointer();
}
-std::vector<MediaFileSystemRegistry::MediaFSIDAndPath>
-MediaFileSystemRegistry::GetMediaFileSystems(
+std::vector<MediaFileSystemRegistry::MediaFSInfo>
+MediaFileSystemRegistry::GetMediaFileSystemsForExtension(
const content::RenderProcessHost* rph,
const extensions::Extension& extension) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- std::vector<MediaFSIDAndPath> results;
+ std::vector<MediaFSInfo> results;
std::pair<ChildIdToMediaFSMap::iterator, bool> ret =
media_fs_map_.insert(std::make_pair(rph, MediaPathToFSIDMap()));
ChildIdToMediaFSMap::iterator& child_it = ret.first;
@@ -98,9 +98,11 @@ MediaFileSystemRegistry::GetMediaFileSystems(
for (MediaPathToFSIDMap::const_iterator it = child_map.begin();
it != child_map.end();
++it) {
- const FilePath path = it->first;
- const std::string fsid = it->second;
- results.push_back(std::make_pair(fsid, path));
+ MediaFSInfo entry;
+ entry.name = it->first.value();
Lei Zhang 2012/07/30 20:56:32 FilePath.value() is a wstring on Windows.
vandebo (ex-Chrome) 2012/07/31 18:27:17 Right. Changed to fsid for now.
+ entry.fsid = it->second;
+ entry.path = it->first;
+ results.push_back(entry);
}
return results;
}

Powered by Google App Engine
This is Rietveld 408576698