Chromium Code Reviews| Index: chrome/browser/media_galleries/fileapi/async_file_util_test_helper.h |
| diff --git a/webkit/browser/fileapi/local_file_util.h b/chrome/browser/media_galleries/fileapi/async_file_util_test_helper.h |
| similarity index 65% |
| copy from webkit/browser/fileapi/local_file_util.h |
| copy to chrome/browser/media_galleries/fileapi/async_file_util_test_helper.h |
| index 80a698a0e32ef41848345f0b9e1616c7a9b891dc..d57181dbaa958b4063e7493c8ee03c908fbeb4fb 100644 |
| --- a/webkit/browser/fileapi/local_file_util.h |
| +++ b/chrome/browser/media_galleries/fileapi/async_file_util_test_helper.h |
| @@ -1,34 +1,26 @@ |
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ |
| -#define WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ |
| +#ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ASYNC_FILE_UTIL_TEST_HELPER_H_ |
| +#define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ASYNC_FILE_UTIL_TEST_HELPER_H_ |
| -#include "base/compiler_specific.h" |
| #include "base/memory/scoped_ptr.h" |
| -#include "base/platform_file.h" |
| +#include "webkit/browser/fileapi/async_file_util.h" |
| #include "webkit/browser/fileapi/file_system_file_util.h" |
| -#include "webkit/storage/webkit_storage_export.h" |
| - |
| -namespace base { |
| -class FilePath; |
| -class Time; |
| -} |
| - |
| -class GURL; |
| namespace fileapi { |
| -class FileSystemOperationContext; |
| +class FileSystemContext; |
| class FileSystemURL; |
| -// An instance of this class is created and owned by *MountPointProvider. |
| -class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil { |
| +// A helper class to perform async file operations in a synchronous way. |
| +class AsyncFileUtilTestHelper : public FileSystemFileUtil { |
|
vandebo (ex-Chrome)
2013/05/31 23:22:17
Since this no longer implements the interface, jus
tommycli
2013/06/01 01:40:54
Done.
|
| public: |
| - LocalFileUtil(); |
| - virtual ~LocalFileUtil(); |
| + explicit AsyncFileUtilTestHelper(AsyncFileUtil* async_file_util); |
| + virtual ~AsyncFileUtilTestHelper(); |
| + // FileSystemFileUtil overrides. |
| virtual base::PlatformFileError CreateOrOpen( |
| FileSystemOperationContext* context, |
| const FileSystemURL& url, |
| @@ -50,10 +42,12 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil { |
| FileSystemOperationContext* context, |
| const FileSystemURL& url, |
| base::PlatformFileInfo* file_info, |
| - base::FilePath* platform_file) OVERRIDE; |
| + base::FilePath* platform_path) OVERRIDE; |
| + // Not implemented. Use ReadDirectorySync instead. |
| virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( |
| FileSystemOperationContext* context, |
| const FileSystemURL& root_url) OVERRIDE; |
| + // Not implemented. |
| virtual base::PlatformFileError GetLocalFilePath( |
| FileSystemOperationContext* context, |
| const FileSystemURL& file_system_url, |
| @@ -67,21 +61,26 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil { |
| FileSystemOperationContext* context, |
| const FileSystemURL& url, |
| int64 length) OVERRIDE; |
| + // Not implemented. |
| virtual base::PlatformFileError CopyOrMoveFile( |
| FileSystemOperationContext* context, |
| const FileSystemURL& src_url, |
| const FileSystemURL& dest_url, |
| bool copy) OVERRIDE; |
| + // Not implemented. |
| virtual base::PlatformFileError CopyInForeignFile( |
| FileSystemOperationContext* context, |
| const base::FilePath& src_file_path, |
| const FileSystemURL& dest_url) OVERRIDE; |
| + // Not implemented. |
| virtual base::PlatformFileError DeleteFile( |
| FileSystemOperationContext* context, |
| const FileSystemURL& url) OVERRIDE; |
| + // Not implemented. |
| virtual base::PlatformFileError DeleteDirectory( |
| FileSystemOperationContext* context, |
| const FileSystemURL& url) OVERRIDE; |
| + // Not implemented. Use CreateSnapshotFileSharable instead. |
| virtual webkit_blob::ScopedFile CreateSnapshotFile( |
| FileSystemOperationContext* context, |
| const FileSystemURL& url, |
| @@ -89,10 +88,23 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil { |
| base::PlatformFileInfo* file_info, |
| base::FilePath* platform_path) OVERRIDE; |
| + virtual base::PlatformFileError ReadDirectorySync( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url, |
| + AsyncFileUtil::EntryList* file_list, |
| + bool* has_more); |
| + |
| + virtual scoped_refptr<webkit_blob::ShareableFileReference> |
| + CreateSnapshotFileSharable( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url, |
| + base::PlatformFileError* error, |
| + base::PlatformFileInfo* file_info, |
| + base::FilePath* platform_path); |
| private: |
| - DISALLOW_COPY_AND_ASSIGN(LocalFileUtil); |
| + scoped_ptr<AsyncFileUtil> async_file_util_; |
| }; |
| } // namespace fileapi |
| -#endif // WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ |
| +#endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ASYNC_FILE_UTIL_TEST_HELPER_H_ |