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/intents/device_attached_intent_source.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
Index: chrome/browser/intents/device_attached_intent_source.cc
diff --git a/chrome/browser/intents/device_attached_intent_source.cc b/chrome/browser/intents/device_attached_intent_source.cc
index de9bacecd853fb0f8a47445ce1d5713210a686a1..f897ca064646503c7162c5808931abd833f2fdfc 100644
--- a/chrome/browser/intents/device_attached_intent_source.cc
+++ b/chrome/browser/intents/device_attached_intent_source.cc
@@ -38,22 +38,22 @@ void DeviceAttachedIntentSource::OnMediaDeviceAttached(
return;
// Sanity checks for |device_path|.
- if (!device_path.IsAbsolute() || device_path.ReferencesParent() ||
- device_path.BaseName().IsAbsolute() || device_path.BaseName().empty()) {
+ if (!device_path.IsAbsolute() || device_path.ReferencesParent()) {
return;
}
+ std::string device_name;
+
// Register device path as an isolated file system.
- std::set<FilePath> fileset;
- fileset.insert(device_path);
const std::string filesystem_id =
- fileapi::IsolatedContext::GetInstance()->
- RegisterIsolatedFileSystem(fileset);
+ fileapi::IsolatedContext::GetInstance()->RegisterFileSystemForFile(
+ device_path, &device_name);
+
CHECK(!filesystem_id.empty());
webkit_glue::WebIntentData intent(
ASCIIToUTF16("chrome-extension://attach"),
ASCIIToUTF16("chrome-extension://filesystem"),
- device_path,
+ device_name,
filesystem_id);
content::WebIntentsDispatcher* dispatcher =
« no previous file with comments | « chrome/browser/extensions/platform_app_launcher.cc ('k') | chrome/browser/media_gallery/media_file_system_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698