| 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/message_loop.h" | 9 #include "base/message_loop/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::Initialize(const fileapi::FileSystemContext* context) { |
| 110 } |
| 111 |
| 109 void FileSystemBackend::InitializeFileSystem( | 112 void FileSystemBackend::InitializeFileSystem( |
| 110 const GURL& origin_url, | 113 const GURL& origin_url, |
| 111 fileapi::FileSystemType type, | 114 fileapi::FileSystemType type, |
| 112 fileapi::OpenFileSystemMode mode, | 115 fileapi::OpenFileSystemMode mode, |
| 113 fileapi::FileSystemContext* context, | 116 fileapi::FileSystemContext* context, |
| 114 const InitializeFileSystemCallback& callback) { | 117 const InitializeFileSystemCallback& callback) { |
| 115 DCHECK(fileapi::IsolatedContext::IsIsolatedType(type)); | 118 DCHECK(fileapi::IsolatedContext::IsIsolatedType(type)); |
| 116 // Nothing to validate for external filesystem. | 119 // Nothing to validate for external filesystem. |
| 117 callback.Run(GetFileSystemRootURI(origin_url, type), | 120 callback.Run(GetFileSystemRootURI(origin_url, type), |
| 118 GetFileSystemName(origin_url, type), | 121 GetFileSystemName(origin_url, type), |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 std::string mount_name = url.filesystem_id(); | 316 std::string mount_name = url.filesystem_id(); |
| 314 if (!mount_points_->GetRegisteredPath(mount_name, &root_path) && | 317 if (!mount_points_->GetRegisteredPath(mount_name, &root_path) && |
| 315 !system_mount_points_->GetRegisteredPath(mount_name, &root_path)) { | 318 !system_mount_points_->GetRegisteredPath(mount_name, &root_path)) { |
| 316 return base::FilePath(); | 319 return base::FilePath(); |
| 317 } | 320 } |
| 318 | 321 |
| 319 return root_path.DirName(); | 322 return root_path.DirName(); |
| 320 } | 323 } |
| 321 | 324 |
| 322 } // namespace chromeos | 325 } // namespace chromeos |
| OLD | NEW |