| 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/media_galleries/fileapi/native_media_file_util.h" | 5 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/files/file_enumerator.h" | 12 #include "base/files/file_enumerator.h" |
| 13 #include "base/files/scoped_platform_file_closer.h" | 13 #include "base/files/scoped_platform_file_closer.h" |
| 14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "base/task_runner_util.h" | 15 #include "base/task_runner_util.h" |
| 16 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" | 16 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" |
| 17 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" | 17 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" |
| 18 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
| 19 #include "net/base/mime_sniffer.h" | 19 #include "net/base/mime_sniffer.h" |
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 21 #include "webkit/browser/fileapi/file_system_context.h" | 21 #include "webkit/browser/fileapi/file_system_context.h" |
| 22 #include "webkit/browser/fileapi/file_system_operation_context.h" | 22 #include "webkit/browser/fileapi/file_system_operation_context.h" |
| 23 #include "webkit/browser/fileapi/file_system_task_runners.h" | |
| 24 #include "webkit/browser/fileapi/native_file_util.h" | 23 #include "webkit/browser/fileapi/native_file_util.h" |
| 25 #include "webkit/common/blob/shareable_file_reference.h" | 24 #include "webkit/common/blob/shareable_file_reference.h" |
| 26 | 25 |
| 27 namespace chrome { | 26 namespace chrome { |
| 28 | 27 |
| 29 namespace { | 28 namespace { |
| 30 | 29 |
| 31 // Used to skip the hidden folders and files. Returns true if the file specified | 30 // Used to skip the hidden folders and files. Returns true if the file specified |
| 32 // by |path| should be skipped. | 31 // by |path| should be skipped. |
| 33 bool ShouldSkip(const base::FilePath& path) { | 32 bool ShouldSkip(const base::FilePath& path) { |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 if (!file_info.is_directory && | 626 if (!file_info.is_directory && |
| 628 !GetMediaPathFilter(context)->Match(file_path)) { | 627 !GetMediaPathFilter(context)->Match(file_path)) { |
| 629 return failure_error; | 628 return failure_error; |
| 630 } | 629 } |
| 631 | 630 |
| 632 *local_file_path = file_path; | 631 *local_file_path = file_path; |
| 633 return base::PLATFORM_FILE_OK; | 632 return base::PLATFORM_FILE_OK; |
| 634 } | 633 } |
| 635 | 634 |
| 636 } // namespace chrome | 635 } // namespace chrome |
| OLD | NEW |