| 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..6c7e5362702ebc82e34e1c8d151f2416b095dfa9 100644
|
| --- a/chrome/browser/intents/device_attached_intent_source.cc
|
| +++ b/chrome/browser/intents/device_attached_intent_source.cc
|
| @@ -38,22 +38,23 @@ 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 = fileapi::IsolatedContext::GetNameForPath(
|
| + device_path);
|
| + DCHECK(!device_name.empty());
|
|
|
| // 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_name, device_path);
|
| +
|
| 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 =
|
|
|