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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 std::vector<FilePath> CrosMountPointProvider::GetRootDirectories() const { | 205 std::vector<FilePath> CrosMountPointProvider::GetRootDirectories() const { |
206 std::vector<FilePath> root_dirs; | 206 std::vector<FilePath> root_dirs; |
207 for (MountPointMap::const_iterator iter = mount_point_map_.begin(); | 207 for (MountPointMap::const_iterator iter = mount_point_map_.begin(); |
208 iter != mount_point_map_.end(); | 208 iter != mount_point_map_.end(); |
209 ++iter) { | 209 ++iter) { |
210 root_dirs.push_back(iter->second.local_root_path.Append(iter->first)); | 210 root_dirs.push_back(iter->second.local_root_path.Append(iter->first)); |
211 } | 211 } |
212 return root_dirs; | 212 return root_dirs; |
213 } | 213 } |
214 | 214 |
215 fileapi::FileSystemFileUtil* CrosMountPointProvider::GetFileUtil() { | 215 fileapi::FileSystemFileUtil* CrosMountPointProvider::GetFileUtil( |
| 216 fileapi::FileSystemType type) { |
216 return local_file_util_.get(); | 217 return local_file_util_.get(); |
217 } | 218 } |
218 | 219 |
219 FilePath CrosMountPointProvider::GetPathForPermissionsCheck( | 220 FilePath CrosMountPointProvider::GetPathForPermissionsCheck( |
220 const FilePath& virtual_path) const { | 221 const FilePath& virtual_path) const { |
221 const MountPoint* mount_point = GetMountPoint(virtual_path); | 222 const MountPoint* mount_point = GetMountPoint(virtual_path); |
222 if (!mount_point) | 223 if (!mount_point) |
223 return FilePath(); | 224 return FilePath(); |
224 | 225 |
225 FilePath root_path = mount_point->local_root_path; | 226 FilePath root_path = mount_point->local_root_path; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 if (mount_prefix == filesystem_path) { | 295 if (mount_prefix == filesystem_path) { |
295 return true; | 296 return true; |
296 } else if (mount_prefix.AppendRelativePath(filesystem_path, virtual_path)) { | 297 } else if (mount_prefix.AppendRelativePath(filesystem_path, virtual_path)) { |
297 return true; | 298 return true; |
298 } | 299 } |
299 } | 300 } |
300 return false; | 301 return false; |
301 } | 302 } |
302 | 303 |
303 } // namespace chromeos | 304 } // namespace chromeos |
OLD | NEW |