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

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: 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/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 =

Powered by Google App Engine
This is Rietveld 408576698