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/fileapi/media/device_media_file_util.h" | 5 #include "webkit/fileapi/media/device_media_file_util.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "webkit/fileapi/file_system_operation_context.h" | 9 #include "webkit/fileapi/file_system_operation_context.h" |
10 #include "webkit/fileapi/file_system_url.h" | 10 #include "webkit/fileapi/file_system_url.h" |
11 #include "webkit/fileapi/isolated_context.h" | 11 #include "webkit/fileapi/isolated_context.h" |
12 #include "webkit/fileapi/media/filtering_file_enumerator.h" | 12 #include "webkit/fileapi/media/filtering_file_enumerator.h" |
13 #include "webkit/fileapi/media/media_path_filter.h" | 13 #include "webkit/fileapi/media/media_path_filter.h" |
14 #include "webkit/fileapi/media/mtp_device_map_service.h" | 14 #include "webkit/fileapi/media/mtp_device_map_service.h" |
15 | 15 |
| 16 using base::PlatformFile; |
16 using base::PlatformFileError; | 17 using base::PlatformFileError; |
17 using base::PlatformFileInfo; | 18 using base::PlatformFileInfo; |
18 | 19 |
19 namespace fileapi { | 20 namespace fileapi { |
20 | 21 |
21 namespace { | 22 namespace { |
22 | 23 |
23 const FilePath::CharType kDeviceMediaFileUtilTempDir[] = | 24 const FilePath::CharType kDeviceMediaFileUtilTempDir[] = |
24 FILE_PATH_LITERAL("DeviceMediaFileSystem"); | 25 FILE_PATH_LITERAL("DeviceMediaFileSystem"); |
25 | 26 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 isolated_media_file_system_dir_path, local_path); | 199 isolated_media_file_system_dir_path, local_path); |
199 if (!file_created) { | 200 if (!file_created) { |
200 LOG(WARNING) << "Could not create a temporary file for media snapshot in " | 201 LOG(WARNING) << "Could not create a temporary file for media snapshot in " |
201 << isolated_media_file_system_dir_path.value(); | 202 << isolated_media_file_system_dir_path.value(); |
202 return base::PLATFORM_FILE_ERROR_FAILED; | 203 return base::PLATFORM_FILE_ERROR_FAILED; |
203 } | 204 } |
204 return delegate->CreateSnapshotFile(url.path(), *local_path, file_info); | 205 return delegate->CreateSnapshotFile(url.path(), *local_path, file_info); |
205 } | 206 } |
206 | 207 |
207 } // namespace fileapi | 208 } // namespace fileapi |
OLD | NEW |