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

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: rebased 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
« no previous file with comments | « chrome/browser/intents/device_attached_intent_source.cc ('k') | content/browser/intents/intent_injector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bde66caf069493f6f5163ddb9674954b842a902d 100644
--- a/chrome/browser/media_gallery/media_file_system_registry.cc
+++ b/chrome/browser/media_gallery/media_file_system_registry.cc
@@ -140,15 +140,13 @@ 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);
+ // The directory name is not exposed to the js layer and we simply use
+ // a fixed name (as we only register a single directory per file system).
+ std::string register_name("_");
const std::string fsid =
- IsolatedContext::GetInstance()->RegisterIsolatedFileSystem(fileset);
+ IsolatedContext::GetInstance()->RegisterFileSystemForFile(
+ path, &register_name);
CHECK(!fsid.empty());
return fsid;
}
@@ -164,7 +162,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);
}
}
« no previous file with comments | « chrome/browser/intents/device_attached_intent_source.cc ('k') | content/browser/intents/intent_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698