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 "chrome/browser/chromeos/file_manager/file_browser_handlers.h" | 5 #include "chrome/browser/chromeos/file_manager/file_browser_handlers.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 DCHECK(handler_extension.get()); | 232 DCHECK(handler_extension.get()); |
233 | 233 |
234 fileapi::ExternalFileSystemBackend* backend = | 234 fileapi::ExternalFileSystemBackend* backend = |
235 file_system_context_handler->external_backend(); | 235 file_system_context_handler->external_backend(); |
236 | 236 |
237 FileDefinitionList file_list; | 237 FileDefinitionList file_list; |
238 for (size_t i = 0; i < file_urls.size(); ++i) { | 238 for (size_t i = 0; i < file_urls.size(); ++i) { |
239 const FileSystemURL& url = file_urls[i]; | 239 const FileSystemURL& url = file_urls[i]; |
240 | 240 |
241 // Check if this file system entry exists first. | 241 // Check if this file system entry exists first. |
242 base::PlatformFileInfo file_info; | 242 base::File::Info file_info; |
243 | 243 |
244 base::FilePath local_path = url.path(); | 244 base::FilePath local_path = url.path(); |
245 base::FilePath virtual_path = url.virtual_path(); | 245 base::FilePath virtual_path = url.virtual_path(); |
246 | 246 |
247 bool is_drive_file = url.type() == fileapi::kFileSystemTypeDrive; | 247 bool is_drive_file = url.type() == fileapi::kFileSystemTypeDrive; |
248 DCHECK(!is_drive_file || drive::util::IsUnderDriveMountPoint(local_path)); | 248 DCHECK(!is_drive_file || drive::util::IsUnderDriveMountPoint(local_path)); |
249 | 249 |
250 // If the file is under drive mount point, there is no actual file to be | 250 // If the file is under drive mount point, there is no actual file to be |
251 // found on the url.path(). | 251 // found on the url.path(). |
252 if (!is_drive_file) { | 252 if (!is_drive_file) { |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 common_handlers.erase(gallery_iter); | 546 common_handlers.erase(gallery_iter); |
547 else | 547 else |
548 common_handlers.erase(watch_iter); | 548 common_handlers.erase(watch_iter); |
549 } | 549 } |
550 | 550 |
551 return common_handlers; | 551 return common_handlers; |
552 } | 552 } |
553 | 553 |
554 } // namespace file_browser_handlers | 554 } // namespace file_browser_handlers |
555 } // namespace file_manager | 555 } // namespace file_manager |
OLD | NEW |