| 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 "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/memory/scoped_generic_obj.h" | 8 #include "base/memory/scoped_generic_obj.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "chrome/browser/media_galleries/fileapi/filtering_file_enumerator.h" | 10 #include "chrome/browser/media_galleries/fileapi/filtering_file_enumerator.h" |
| 11 #include "chrome/browser/media_galleries/fileapi/media_file_system_mount_point_p
rovider.h" | 11 #include "chrome/browser/media_galleries/fileapi/media_file_system_mount_point_p
rovider.h" |
| 12 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" | 12 #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" |
| 13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 14 #include "net/base/mime_sniffer.h" | 14 #include "net/base/mime_sniffer.h" |
| 15 #include "webkit/browser/fileapi/native_file_util.h" |
| 15 #include "webkit/fileapi/file_system_context.h" | 16 #include "webkit/fileapi/file_system_context.h" |
| 16 #include "webkit/fileapi/file_system_operation_context.h" | 17 #include "webkit/fileapi/file_system_operation_context.h" |
| 17 #include "webkit/fileapi/file_system_task_runners.h" | 18 #include "webkit/fileapi/file_system_task_runners.h" |
| 18 #include "webkit/fileapi/native_file_util.h" | |
| 19 | 19 |
| 20 using base::PlatformFile; | 20 using base::PlatformFile; |
| 21 using base::PlatformFileError; | 21 using base::PlatformFileError; |
| 22 using base::PlatformFileInfo; | 22 using base::PlatformFileInfo; |
| 23 using fileapi::FileSystemOperationContext; | 23 using fileapi::FileSystemOperationContext; |
| 24 using fileapi::FileSystemURL; | 24 using fileapi::FileSystemURL; |
| 25 using fileapi::NativeFileUtil; | 25 using fileapi::NativeFileUtil; |
| 26 | 26 |
| 27 namespace chrome { | 27 namespace chrome { |
| 28 | 28 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 if (StartsWithASCII(mime_type, "image/", true) || | 297 if (StartsWithASCII(mime_type, "image/", true) || |
| 298 StartsWithASCII(mime_type, "audio/", true) || | 298 StartsWithASCII(mime_type, "audio/", true) || |
| 299 StartsWithASCII(mime_type, "video/", true) || | 299 StartsWithASCII(mime_type, "video/", true) || |
| 300 mime_type == "application/x-shockwave-flash") { | 300 mime_type == "application/x-shockwave-flash") { |
| 301 return base::PLATFORM_FILE_OK; | 301 return base::PLATFORM_FILE_OK; |
| 302 } | 302 } |
| 303 return base::PLATFORM_FILE_ERROR_SECURITY; | 303 return base::PLATFORM_FILE_ERROR_SECURITY; |
| 304 } | 304 } |
| 305 | 305 |
| 306 } // namespace chrome | 306 } // namespace chrome |
| OLD | NEW |