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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 return file_access_permissions_->HasAccessPermission(extension_id, | 125 return file_access_permissions_->HasAccessPermission(extension_id, |
126 virtual_path); | 126 virtual_path); |
127 } | 127 } |
128 | 128 |
129 // TODO(zelidrag): Share this code with SandboxMountPointProvider impl. | 129 // TODO(zelidrag): Share this code with SandboxMountPointProvider impl. |
130 bool CrosMountPointProvider::IsRestrictedFileName(const FilePath& path) const { | 130 bool CrosMountPointProvider::IsRestrictedFileName(const FilePath& path) const { |
131 return false; | 131 return false; |
132 } | 132 } |
133 | 133 |
| 134 fileapi::FileSystemQuotaUtil* CrosMountPointProvider::GetQuotaUtil() { |
| 135 // No quota support. |
| 136 return NULL; |
| 137 } |
| 138 |
134 bool CrosMountPointProvider::HasMountPoint(const FilePath& mount_point) { | 139 bool CrosMountPointProvider::HasMountPoint(const FilePath& mount_point) { |
135 base::AutoLock locker(mount_point_map_lock_); | 140 base::AutoLock locker(mount_point_map_lock_); |
136 MountPointMap::const_iterator iter = mount_point_map_.find( | 141 MountPointMap::const_iterator iter = mount_point_map_.find( |
137 mount_point.BaseName().value()); | 142 mount_point.BaseName().value()); |
138 DCHECK(iter == mount_point_map_.end() || | 143 DCHECK(iter == mount_point_map_.end() || |
139 iter->second.local_root_path == mount_point.DirName()); | 144 iter->second.local_root_path == mount_point.DirName()); |
140 return iter != mount_point_map_.end(); | 145 return iter != mount_point_map_.end(); |
141 } | 146 } |
142 | 147 |
143 void CrosMountPointProvider::AddLocalMountPoint(const FilePath& mount_point) { | 148 void CrosMountPointProvider::AddLocalMountPoint(const FilePath& mount_point) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 if (mount_prefix == filesystem_path) { | 276 if (mount_prefix == filesystem_path) { |
272 return true; | 277 return true; |
273 } else if (mount_prefix.AppendRelativePath(filesystem_path, virtual_path)) { | 278 } else if (mount_prefix.AppendRelativePath(filesystem_path, virtual_path)) { |
274 return true; | 279 return true; |
275 } | 280 } |
276 } | 281 } |
277 return false; | 282 return false; |
278 } | 283 } |
279 | 284 |
280 } // namespace chromeos | 285 } // namespace chromeos |
OLD | NEW |