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

Unified Diff: chrome/browser/chromeos/extensions/file_handler_util.cc

Issue 10993066: Add oem mount point to cros_mount_provider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « no previous file | webkit/chromeos/fileapi/cros_mount_point_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_handler_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_handler_util.cc b/chrome/browser/chromeos/extensions/file_handler_util.cc
index 18058dcae12843f993dac35d7cb98bef33104b23..78616620af184edaf053cd7bbc7744ecadffaf4f 100644
--- a/chrome/browser/chromeos/extensions/file_handler_util.cc
+++ b/chrome/browser/chromeos/extensions/file_handler_util.cc
@@ -57,12 +57,14 @@ const char kTaskWebIntent[] = "web-intent";
namespace {
+typedef std::set<const FileBrowserHandler*> FileBrowserHandlerSet;
+
// Legacy Drive task extension prefix, used by CrackTaskID.
const char kDriveTaskExtensionPrefix[] = "drive-app:";
const size_t kDriveTaskExtensionPrefixLength =
arraysize(kDriveTaskExtensionPrefix) - 1;
-typedef std::set<const FileBrowserHandler*> FileBrowserHandlerSet;
+const char kOemMountPointID[] = "oem";
const int kReadWriteFilePermissions = base::PLATFORM_FILE_OPEN |
base::PLATFORM_FILE_CREATE |
@@ -719,6 +721,11 @@ class ExtensionTaskExecutor::ExecuteTasksFileSystemCallbackDispatcher {
if (!chromeos::CrosMountPointProvider::CanHandleURL(url))
return false;
+ if (url.filesystem_id() == kOemMountPointID) {
zel 2012/09/27 20:11:10 let's create a more general concept of read-only m
+ LOG(ERROR) << "Can't grant permissions for oem mount point.";
+ return false;
+ }
+
fileapi::ExternalFileSystemMountPointProvider* external_provider =
file_system_context_->external_provider();
if (!external_provider || !external_provider->IsAccessAllowed(url))
@@ -1045,6 +1052,11 @@ bool WebIntentTaskExecutor::ExecuteForURL(const GURL& file_url) {
if (!chromeos::CrosMountPointProvider::CanHandleURL(url))
return false;
+ if (url.filesystem_id() == kOemMountPointID) {
+ LOG(ERROR) << "Can't grant permissions for oem mount point.";
+ return false;
+ }
+
scoped_refptr<fileapi::FileSystemContext> file_system_context =
BrowserContext::GetDefaultStoragePartition(profile())->
GetFileSystemContext();
« no previous file with comments | « no previous file | webkit/chromeos/fileapi/cros_mount_point_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698