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

Side by Side Diff: chrome/browser/intents/device_attached_intent_source.cc

Issue 10825042: Implement media path filter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/intents/device_attached_intent_source.h" 5 #include "chrome/browser/intents/device_attached_intent_source.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const FilePath device_path(location); 47 const FilePath device_path(location);
48 if (!device_path.IsAbsolute() || device_path.ReferencesParent()) 48 if (!device_path.IsAbsolute() || device_path.ReferencesParent())
49 return; 49 return;
50 50
51 std::string device_name; 51 std::string device_name;
52 52
53 // Register device path as an isolated file system. 53 // Register device path as an isolated file system.
54 // TODO(kinuko, kmadhusu): Use a different file system type for MTP. 54 // TODO(kinuko, kmadhusu): Use a different file system type for MTP.
55 const std::string filesystem_id = 55 const std::string filesystem_id =
56 fileapi::IsolatedContext::GetInstance()->RegisterFileSystemForPath( 56 fileapi::IsolatedContext::GetInstance()->RegisterFileSystemForPath(
57 fileapi::kFileSystemTypeIsolated, device_path, &device_name); 57 fileapi::kFileSystemTypeLocalMedia, device_path, &device_name);
kmadhusu 2012/07/26 20:26:43 This is a file system for attached device media. C
tzik 2012/07/27 01:00:23 Hmm. We might have two type of media device. One i
kmadhusu 2012/07/27 01:22:42 I thought kFileSystemTypeLocalMedia corresponds to
tzik 2012/07/27 18:33:22 Yes, I mean that exactly. As we chatted, s/LocalMe
58 58
59 CHECK(!filesystem_id.empty()); 59 CHECK(!filesystem_id.empty());
60 webkit_glue::WebIntentData intent( 60 webkit_glue::WebIntentData intent(
61 ASCIIToUTF16("chrome-extension://attach"), 61 ASCIIToUTF16("chrome-extension://attach"),
62 ASCIIToUTF16("chrome-extension://filesystem"), 62 ASCIIToUTF16("chrome-extension://filesystem"),
63 device_name, 63 device_name,
64 filesystem_id); 64 filesystem_id);
65 65
66 delegate_->WebIntentDispatch(NULL /* no WebContents */, 66 delegate_->WebIntentDispatch(NULL /* no WebContents */,
67 content::WebIntentsDispatcher::Create(intent)); 67 content::WebIntentsDispatcher::Create(intent));
68 } 68 }
OLDNEW
« no previous file with comments | « no previous file | webkit/fileapi/file_system_operation_context.h » ('j') | webkit/fileapi/media/local_media_file_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698