| 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   // TODO(nhiroki): Avoid this hard-coded mount type to support multiple | 
 |  114   // filesystems (http://crbug.com/297412). | 
 |  115   fileapi::FileSystemType mount_type = fileapi::kFileSystemTypeExternal; | 
|  113   // Nothing to validate for external filesystem. |  116   // Nothing to validate for external filesystem. | 
|  114   callback.Run(GetFileSystemRootURI(origin_url, type), |  117   callback.Run(GetFileSystemRootURI(origin_url, mount_type), | 
|  115                GetFileSystemName(origin_url, type), |  118                GetFileSystemName(origin_url, mount_type), | 
|  116                base::PLATFORM_FILE_OK); |  119                base::PLATFORM_FILE_OK); | 
|  117 } |  120 } | 
|  118  |  121  | 
|  119 fileapi::FileSystemQuotaUtil* FileSystemBackend::GetQuotaUtil() { |  122 fileapi::FileSystemQuotaUtil* FileSystemBackend::GetQuotaUtil() { | 
|  120   // No quota support. |  123   // No quota support. | 
|  121   return NULL; |  124   return NULL; | 
|  122 } |  125 } | 
|  123  |  126  | 
|  124 bool FileSystemBackend::IsAccessAllowed( |  127 bool FileSystemBackend::IsAccessAllowed( | 
|  125     const fileapi::FileSystemURL& url) const { |  128     const fileapi::FileSystemURL& url) const { | 
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  292 } |  295 } | 
|  293  |  296  | 
|  294 bool FileSystemBackend::GetVirtualPath( |  297 bool FileSystemBackend::GetVirtualPath( | 
|  295     const base::FilePath& filesystem_path, |  298     const base::FilePath& filesystem_path, | 
|  296     base::FilePath* virtual_path) { |  299     base::FilePath* virtual_path) { | 
|  297   return mount_points_->GetVirtualPath(filesystem_path, virtual_path) || |  300   return mount_points_->GetVirtualPath(filesystem_path, virtual_path) || | 
|  298          system_mount_points_->GetVirtualPath(filesystem_path, virtual_path); |  301          system_mount_points_->GetVirtualPath(filesystem_path, virtual_path); | 
|  299 } |  302 } | 
|  300  |  303  | 
|  301 }  // namespace chromeos |  304 }  // namespace chromeos | 
| OLD | NEW |