OLD | NEW |
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 "webkit/browser/fileapi/isolated_mount_point_provider.h" | 5 #include "webkit/browser/fileapi/isolated_mount_point_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #if !defined(OS_CHROMEOS) | 49 #if !defined(OS_CHROMEOS) |
50 case kFileSystemTypeNativeLocal: | 50 case kFileSystemTypeNativeLocal: |
51 case kFileSystemTypeNativeForPlatformApp: | 51 case kFileSystemTypeNativeForPlatformApp: |
52 return true; | 52 return true; |
53 #endif | 53 #endif |
54 default: | 54 default: |
55 return false; | 55 return false; |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 void IsolatedMountPointProvider::ValidateFileSystemRoot( | 59 void IsolatedMountPointProvider::OpenFileSystem( |
60 const GURL& origin_url, | 60 const GURL& origin_url, |
61 FileSystemType type, | 61 FileSystemType type, |
62 bool create, | 62 OpenFileSystemMode mode, |
63 const ValidateFileSystemCallback& callback) { | 63 const OpenFileSystemCallback& callback) { |
64 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. | 64 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. |
65 base::MessageLoopProxy::current()->PostTask( | 65 base::MessageLoopProxy::current()->PostTask( |
66 FROM_HERE, | 66 FROM_HERE, |
67 base::Bind(callback, base::PLATFORM_FILE_ERROR_SECURITY)); | 67 base::Bind(callback, base::PLATFORM_FILE_ERROR_SECURITY)); |
68 } | 68 } |
69 | 69 |
70 FileSystemFileUtil* IsolatedMountPointProvider::GetFileUtil( | 70 FileSystemFileUtil* IsolatedMountPointProvider::GetFileUtil( |
71 FileSystemType type) { | 71 FileSystemType type) { |
72 switch (type) { | 72 switch (type) { |
73 case kFileSystemTypeNativeLocal: | 73 case kFileSystemTypeNativeLocal: |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 void IsolatedMountPointProvider::DeleteFileSystem( | 159 void IsolatedMountPointProvider::DeleteFileSystem( |
160 const GURL& origin_url, | 160 const GURL& origin_url, |
161 FileSystemType type, | 161 FileSystemType type, |
162 FileSystemContext* context, | 162 FileSystemContext* context, |
163 const DeleteFileSystemCallback& callback) { | 163 const DeleteFileSystemCallback& callback) { |
164 NOTREACHED(); | 164 NOTREACHED(); |
165 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); | 165 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); |
166 } | 166 } |
167 | 167 |
168 } // namespace fileapi | 168 } // namespace fileapi |
OLD | NEW |