Chromium Code Reviews| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 } | 102 } | 
| 103 | 103 | 
| 104 void FileSystemBackend::Initialize(fileapi::FileSystemContext* context) { | 104 void FileSystemBackend::Initialize(fileapi::FileSystemContext* context) { | 
| 105 } | 105 } | 
| 106 | 106 | 
| 107 void FileSystemBackend::OpenFileSystem( | 107 void FileSystemBackend::OpenFileSystem( | 
| 108 const GURL& origin_url, | 108 const GURL& origin_url, | 
| 109 fileapi::FileSystemType type, | 109 fileapi::FileSystemType type, | 
| 110 fileapi::OpenFileSystemMode mode, | 110 fileapi::OpenFileSystemMode mode, | 
| 111 const OpenFileSystemCallback& callback) { | 111 const OpenFileSystemCallback& callback) { | 
| 112 DCHECK(fileapi::IsolatedContext::IsIsolatedType(type)); | 112 DCHECK(CanHandleType(type)); | 
| 113 fileapi::FileSystemType mount_type = fileapi::kFileSystemTypeExternal; | |
| 113 // Nothing to validate for external filesystem. | 114 // Nothing to validate for external filesystem. | 
| 114 callback.Run(GetFileSystemRootURI(origin_url, type), | 115 callback.Run(GetFileSystemRootURI(origin_url, mount_type), | 
| 115 GetFileSystemName(origin_url, type), | 116 GetFileSystemName(origin_url, mount_type), | 
| 
 
kinuko
2013/09/23 23:57:34
Hmm... this looks to be a very unfortunate change,
 
satorux1
2013/09/24 04:12:51
Agreed. TODO comment is a crbug.com URL would be n
 
nhiroki
2013/09/24 06:14:28
Filed (http://crbug.com/297412) and added a commen
 
 | |
| 116 base::PLATFORM_FILE_OK); | 117 base::PLATFORM_FILE_OK); | 
| 117 } | 118 } | 
| 118 | 119 | 
| 119 fileapi::FileSystemQuotaUtil* FileSystemBackend::GetQuotaUtil() { | 120 fileapi::FileSystemQuotaUtil* FileSystemBackend::GetQuotaUtil() { | 
| 120 // No quota support. | 121 // No quota support. | 
| 121 return NULL; | 122 return NULL; | 
| 122 } | 123 } | 
| 123 | 124 | 
| 124 bool FileSystemBackend::IsAccessAllowed( | 125 bool FileSystemBackend::IsAccessAllowed( | 
| 125 const fileapi::FileSystemURL& url) const { | 126 const fileapi::FileSystemURL& url) const { | 
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 } | 293 } | 
| 293 | 294 | 
| 294 bool FileSystemBackend::GetVirtualPath( | 295 bool FileSystemBackend::GetVirtualPath( | 
| 295 const base::FilePath& filesystem_path, | 296 const base::FilePath& filesystem_path, | 
| 296 base::FilePath* virtual_path) { | 297 base::FilePath* virtual_path) { | 
| 297 return mount_points_->GetVirtualPath(filesystem_path, virtual_path) || | 298 return mount_points_->GetVirtualPath(filesystem_path, virtual_path) || | 
| 298 system_mount_points_->GetVirtualPath(filesystem_path, virtual_path); | 299 system_mount_points_->GetVirtualPath(filesystem_path, virtual_path); | 
| 299 } | 300 } | 
| 300 | 301 | 
| 301 } // namespace chromeos | 302 } // namespace chromeos | 
| OLD | NEW |