| 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/chromeos/fileapi/cros_mount_point_provider.h" | 5 #include "webkit/chromeos/fileapi/cros_mount_point_provider.h" |
| 6 | 6 |
| 7 #include "base/chromeos/chromeos_version.h" | 7 #include "base/chromeos/chromeos_version.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 CrosMountPointProvider::CrosMountPointProvider( | 48 CrosMountPointProvider::CrosMountPointProvider( |
| 49 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) | 49 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) |
| 50 : special_storage_policy_(special_storage_policy), | 50 : special_storage_policy_(special_storage_policy), |
| 51 file_access_permissions_(new FileAccessPermissions()), | 51 file_access_permissions_(new FileAccessPermissions()), |
| 52 local_file_util_(new fileapi::IsolatedFileUtil()) { | 52 local_file_util_(new fileapi::IsolatedFileUtil()) { |
| 53 FilePath home_path; | 53 FilePath home_path; |
| 54 if (PathService::Get(base::DIR_HOME, &home_path)) | 54 if (PathService::Get(base::DIR_HOME, &home_path)) |
| 55 AddLocalMountPoint(home_path.AppendASCII("Downloads")); | 55 AddLocalMountPoint(home_path.AppendASCII("Downloads")); |
| 56 AddLocalMountPoint(FilePath(FILE_PATH_LITERAL("/media/archive"))); | 56 AddLocalMountPoint(FilePath(FILE_PATH_LITERAL("/media/archive"))); |
| 57 AddLocalMountPoint(FilePath(FILE_PATH_LITERAL("/media/removable"))); | 57 AddLocalMountPoint(FilePath(FILE_PATH_LITERAL("/media/removable"))); |
| 58 AddLocalMountPoint(FilePath(FILE_PATH_LITERAL("/usr/share/oem"))); |
| 58 } | 59 } |
| 59 | 60 |
| 60 CrosMountPointProvider::~CrosMountPointProvider() { | 61 CrosMountPointProvider::~CrosMountPointProvider() { |
| 61 } | 62 } |
| 62 | 63 |
| 63 void CrosMountPointProvider::ValidateFileSystemRoot( | 64 void CrosMountPointProvider::ValidateFileSystemRoot( |
| 64 const GURL& origin_url, | 65 const GURL& origin_url, |
| 65 fileapi::FileSystemType type, | 66 fileapi::FileSystemType type, |
| 66 bool create, | 67 bool create, |
| 67 const ValidateFileSystemCallback& callback) { | 68 const ValidateFileSystemCallback& callback) { |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 } | 282 } |
| 282 return iter->first.DirName().AppendRelativePath( | 283 return iter->first.DirName().AppendRelativePath( |
| 283 filesystem_path, virtual_path); | 284 filesystem_path, virtual_path); |
| 284 } | 285 } |
| 285 | 286 |
| 286 fileapi::IsolatedContext* CrosMountPointProvider::isolated_context() const { | 287 fileapi::IsolatedContext* CrosMountPointProvider::isolated_context() const { |
| 287 return fileapi::IsolatedContext::GetInstance(); | 288 return fileapi::IsolatedContext::GetInstance(); |
| 288 } | 289 } |
| 289 | 290 |
| 290 } // namespace chromeos | 291 } // namespace chromeos |
| OLD | NEW |