| 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/tools/test_shell/simple_file_system.h" | 5 #include "webkit/tools/test_shell/simple_file_system.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| 11 #include "base/time.h" | 11 #include "base/time.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 14 #include "net/base/mime_util.h" | 14 #include "net/base/mime_util.h" |
| 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileInfo.h" | 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileInfo.h" |
| 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" | 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" |
| 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" | 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback
s.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback
s.h" |
| 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemEntry.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemEntry.h" |
| 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 22 #include "webkit/base/file_path_string_conversions.h" | 22 #include "webkit/base/file_path_string_conversions.h" |
| 23 #include "webkit/blob/blob_storage_controller.h" | 23 #include "webkit/blob/blob_storage_controller.h" |
| 24 #include "webkit/browser/fileapi/file_system_mount_point_provider.h" | 24 #include "webkit/browser/fileapi/file_system_mount_point_provider.h" |
| 25 #include "webkit/browser/fileapi/mock_file_system_context.h" |
| 25 #include "webkit/fileapi/directory_entry.h" | 26 #include "webkit/fileapi/directory_entry.h" |
| 26 #include "webkit/fileapi/file_permission_policy.h" | 27 #include "webkit/fileapi/file_permission_policy.h" |
| 27 #include "webkit/fileapi/file_system_url.h" | 28 #include "webkit/fileapi/file_system_url.h" |
| 28 #include "webkit/fileapi/file_system_util.h" | 29 #include "webkit/fileapi/file_system_util.h" |
| 29 #include "webkit/fileapi/mock_file_system_context.h" | |
| 30 #include "webkit/tools/test_shell/simple_file_writer.h" | 30 #include "webkit/tools/test_shell/simple_file_writer.h" |
| 31 | 31 |
| 32 using base::WeakPtr; | 32 using base::WeakPtr; |
| 33 | 33 |
| 34 using WebKit::WebFileInfo; | 34 using WebKit::WebFileInfo; |
| 35 using WebKit::WebFileSystem; | 35 using WebKit::WebFileSystem; |
| 36 using WebKit::WebFileSystemCallbacks; | 36 using WebKit::WebFileSystemCallbacks; |
| 37 using WebKit::WebFileSystemEntry; | 37 using WebKit::WebFileSystemEntry; |
| 38 using WebKit::WebFileWriter; | 38 using WebKit::WebFileWriter; |
| 39 using WebKit::WebFileWriterClient; | 39 using WebKit::WebFileWriterClient; |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 web_file_info.modificationTime = info.last_modified.ToDoubleT(); | 398 web_file_info.modificationTime = info.last_modified.ToDoubleT(); |
| 399 web_file_info.type = info.is_directory ? | 399 web_file_info.type = info.is_directory ? |
| 400 WebFileInfo::TypeDirectory : WebFileInfo::TypeFile; | 400 WebFileInfo::TypeDirectory : WebFileInfo::TypeFile; |
| 401 web_file_info.platformPath = | 401 web_file_info.platformPath = |
| 402 webkit_base::FilePathToWebString(platform_path); | 402 webkit_base::FilePathToWebString(platform_path); |
| 403 callbacks->didCreateSnapshotFile(web_file_info); | 403 callbacks->didCreateSnapshotFile(web_file_info); |
| 404 } else { | 404 } else { |
| 405 callbacks->didFail(fileapi::PlatformFileErrorToWebFileError(result)); | 405 callbacks->didFail(fileapi::PlatformFileErrorToWebFileError(result)); |
| 406 } | 406 } |
| 407 } | 407 } |
| OLD | NEW |