OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/fileapi/file_system_backend.h" | 5 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 case fileapi::kFileSystemTypeDrive: | 99 case fileapi::kFileSystemTypeDrive: |
100 case fileapi::kFileSystemTypeRestrictedNativeLocal: | 100 case fileapi::kFileSystemTypeRestrictedNativeLocal: |
101 case fileapi::kFileSystemTypeNativeLocal: | 101 case fileapi::kFileSystemTypeNativeLocal: |
102 case fileapi::kFileSystemTypeNativeForPlatformApp: | 102 case fileapi::kFileSystemTypeNativeForPlatformApp: |
103 return true; | 103 return true; |
104 default: | 104 default: |
105 return false; | 105 return false; |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
109 void FileSystemBackend::OpenFileSystem( | 109 void FileSystemBackend::InitializeFileSystem( |
110 const GURL& origin_url, | 110 const GURL& origin_url, |
111 fileapi::FileSystemType type, | 111 fileapi::FileSystemType type, |
112 fileapi::OpenFileSystemMode mode, | 112 fileapi::OpenFileSystemMode mode, |
113 const OpenFileSystemCallback& callback) { | 113 fileapi::FileSystemContext* context, |
| 114 const InitializeFileSystemCallback& callback) { |
114 DCHECK(fileapi::IsolatedContext::IsIsolatedType(type)); | 115 DCHECK(fileapi::IsolatedContext::IsIsolatedType(type)); |
115 // Nothing to validate for external filesystem. | 116 // Nothing to validate for external filesystem. |
116 callback.Run(GetFileSystemRootURI(origin_url, type), | 117 callback.Run(GetFileSystemRootURI(origin_url, type), |
117 GetFileSystemName(origin_url, type), | 118 GetFileSystemName(origin_url, type), |
118 base::PLATFORM_FILE_OK); | 119 base::PLATFORM_FILE_OK); |
119 } | 120 } |
120 | 121 |
121 fileapi::FileSystemQuotaUtil* FileSystemBackend::GetQuotaUtil() { | 122 fileapi::FileSystemQuotaUtil* FileSystemBackend::GetQuotaUtil() { |
122 // No quota support. | 123 // No quota support. |
123 return NULL; | 124 return NULL; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 std::string mount_name = url.filesystem_id(); | 315 std::string mount_name = url.filesystem_id(); |
315 if (!mount_points_->GetRegisteredPath(mount_name, &root_path) && | 316 if (!mount_points_->GetRegisteredPath(mount_name, &root_path) && |
316 !system_mount_points_->GetRegisteredPath(mount_name, &root_path)) { | 317 !system_mount_points_->GetRegisteredPath(mount_name, &root_path)) { |
317 return base::FilePath(); | 318 return base::FilePath(); |
318 } | 319 } |
319 | 320 |
320 return root_path.DirName(); | 321 return root_path.DirName(); |
321 } | 322 } |
322 | 323 |
323 } // namespace chromeos | 324 } // namespace chromeos |
OLD | NEW |