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

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

Issue 10713007: Make isolated file system works for a device root (e.g. X:\\) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 28877f8cbd49f8133555564617e471a1ac6311b6..6fe59b8bba67110c0a78013bfc2d5d488ecd0077 100644
--- a/chrome/browser/media_gallery/media_file_system_registry.cc
+++ b/chrome/browser/media_gallery/media_file_system_registry.cc
@@ -140,15 +140,10 @@ std::string MediaFileSystemRegistry::RegisterPathAsFileSystem(
// Sanity checks for |path|.
CHECK(path.IsAbsolute());
CHECK(!path.ReferencesParent());
- // Make sure |path| does not refer to '/' on Unix.
- // TODO(thestig) Check how BaseName() works for say, 'C:\' on Windows.
- CHECK(!path.BaseName().IsAbsolute());
- CHECK(!path.BaseName().empty());
- std::set<FilePath> fileset;
- fileset.insert(path);
+ std::string name = IsolatedContext::GetNameForPath(path);
const std::string fsid =
- IsolatedContext::GetInstance()->RegisterIsolatedFileSystem(fileset);
+ IsolatedContext::GetInstance()->RegisterFileSystemForFile(name, path);
CHECK(!fsid.empty());
return fsid;
}
@@ -164,7 +159,7 @@ void MediaFileSystemRegistry::RevokeMediaFileSystem(const FilePath& path) {
MediaPathToFSIDMap::iterator media_path_it = child_map.find(path);
if (media_path_it == child_map.end())
continue;
- isolated_context->RevokeIsolatedFileSystem(media_path_it->second);
+ isolated_context->RevokeFileSystem(media_path_it->second);
child_map.erase(media_path_it);
}
}

Powered by Google App Engine
This is Rietveld 408576698